No announcement yet.

PHP mail function problems!!!

  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP mail function problems!!!

    I have a PHP referral program that emails the message content in a form to a person. Once the email is sent it displays the <a href and </a> tags. I do not want the tags

    Here is and example of a run, when I email myself.

    //In the Form

    Name: Ali
    email: [email protected]
    message: Hi there check out this poll go vote for it its really cool.

    The message posts correctly but I cannot get it to include the website link correctly.

    I want the message to include my website name how do I do this correctly

    for example this is what happens

    Hey whats up hope you get this!!!
    This message has been sent to you by Ali
    Vote for your opinion at <a href=
    >the Monthly poll/a>
    Poll of the month questionaire:
    What do you think of our soccer loss to Ghana?

    **** <HTML><A HREF=""><\A></HTML> - where it
    happens first ****

    This is not what I want, I do not want the <A href tags to appear I just want the link to appear as

    Here is the code:

    PHP Code:
    $link_tag "";

    $message .= "\n";

    $message .= "This message has been sent to you by $name\n";

    $message .= "Vote for your opinion at <a href= \"$link_tag\" >[url][/url]</a>\n";

    $message .= "Poll of the month questionaire:\n";
    $message .= "$question\n";

    $message .= "\n\n\n";

    $message .= "**** <HTML><A HREF=\"\"><\A></HTML> -  where it happens first ****";
    //here is the mail function
    mail($email"Poll of Opinion Commentary"$message$headers); 

    So my final question is how do I implement this line

    PHP Code:
    $message .= "**** <HTML><A HREF=\"\"><\A></HTML> -  where it happens first ****"
    to correctly display this in the email message:

    ***** - where it happens first ****
    Last edited by aibrahim; Fri 24 Aug '01, 1:59pm.

  • #2
    is this what you want?
    PHP Code:
    $message .= "**** -  where it happens first ****"


    • #3
      what does .= mean in PHP?


      • #4
        Originally posted by Chexbox
        what does .= mean in PHP?
        it adds to a variable


        $foo = "12345";

        if you echo that, it would be "12345"

        but if you do this:

        $foo = "12345";
        $foo .= "67890";

        then it echoes "1234567890"

        it can also be done in a single line, like this:

        $foo = "12345" . "67890";


        • #5
          I would say 'append'.


          • #6
            true, i am daunted by your superior implementation of our english language


            • #7
              Originally posted by Gellpak
              true, i am daunted by your superior implementation of our english language
              imple- what? got a smaller word for me? =P


              • #8
                I've seen these two words almost everywhere: foo and bar. Is there a specific meaning behind them?


                • #9
                  just php/programming ... i guess history words
                  kinda like "hello world!"


                  • #10
                    So there isn't any meaning behind them?


                    • #11
                      <jargon> /foo/ A sample name for absolutely anything, especially programs and files

                      <programming, convention> /bar/ The second metasyntactic variable, after foo and before baz. E.g. "Suppose function FOO calls functions BAR..."

                      Many people have no idea what they mean (myself included). They are not terms used in every day language. They are just used in code as example variable names or strings or whatnot.


                      • #12
                        just kinda 'cult words', from what ive gathered


                        • #13
                          hehe, i'll be usin that one a lot now...


                          • #14
                            Were you in the military, s.molinari?


                            • #15
                              Thank You all for your help.

                              S. Molinari, thank you this line of code below enabled the use of html and so it worked. Thank you again.

                              Nice car by the way, do you own one.

                              PHP Code:
                              $headers "Content-Type: text/html; charset=iso-8859-1\n"
                              Last edited by aibrahim; Mon 27 Aug '01, 4:15pm.


                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.