Announcement

Collapse
No announcement yet.

PHP mail function problems!!!

Collapse
X
 
  • 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=
    "http://www.homepage.com/poll.php"
    >the Monthly poll/a>
    Poll of the month questionaire:
    What do you think of our soccer loss to Ghana?

    **** <HTML><A HREF="http://www.homepage.com">Homepage.com<\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 Homepage.com

    Here is the code:

    PHP Code:
    $link_tag "http://www.homepage.com/poll.php";

    $message .= "\n";

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

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

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

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

    $message .= "**** <HTML><A HREF=\"http://www.Homepage.com\">Homepage.com<\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=\"http://www.Homepage.com\">Homepage.com<\A></HTML> -  where it happens first ****"
    to correctly display this in the email message:

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

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

    Comment


    • #3
      what does .= mean in PHP?

      Comment


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

        ex:

        $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";

        Comment


        • #5
          I would say 'append'.

          Comment


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

            Comment


            • #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

              Comment


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

                Comment


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

                  Comment


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

                    Comment


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

                      Bar:
                      <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.

                      Comment


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

                        Comment


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

                          Comment


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

                            Comment


                            • #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 27th Aug '01, 4:15pm.

                              Comment

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