Re: PHP HTML Form mail question




"Andy Jeffries" <news@xxxxxxxxxxxxxxxxxx> wrote in message
news:pan.2006.03.30.08.56.41.398091@xxxxxxxxxxxxxxxxxxxxx
On Thu, 30 Mar 2006 10:35:32 +0200, Wayne wrote:

Hi,

I have recently added tried to update the feedback form on my page to be
sent in HTML format.

Problem is that when its submitted, I get the mail without the variable
input, just the variable name.

I have added the text version to it and both send fine, but still only
the
text version includes the variable input.

HTML code taken directly from php.net example (See my form below).

Can anyone advise how I can solve this ?

Because you've used single quotes on the line:

$message = '

If you wrap a string in single quotes variables are not substituted within
it. You need to wrap the content for $message in double quotes.


or close the quote, place the variable, continue the quote .. e.g.

$headers .= 'From: $contactname <'.$contactemailaddress.'>' . "\r\n";

Although I'm not sure what that list bit on the OP's line is trying to do.


.



Relevant Pages

  • Re: PHP HTML Form mail question
    ... I have recently added tried to update the feedback form on my page to be ... sent in HTML format. ... If you wrap a string in single quotes variables are not substituted within ... You need to wrap the content for $message in double quotes. ...
    (comp.lang.php)
  • Re: What is wrong with Weight
    ... wrap it in double quotes. ... your search phrases in double quotes. ... > in search condition 'Weight'. ...
    (microsoft.public.sqlserver.fulltext)
  • Re: *.lnk file format
    ... >>It appears that you can't pass parameters in a .lnk file, ... and wrap the argument in a second set. ... > The count includes the whole string (quotes, spaces, and all) - but I ...
    (microsoft.public.pocketpc.developer)
  • Re: *.lnk file format
    ... >It appears that you can't pass parameters in a .lnk file, ... and wrap the argument in a second set. ... The count includes the whole string (quotes, spaces, and all) - but I ...
    (microsoft.public.pocketpc.developer)
  • What is wrong with Weight
    ... Seems to be odd that this one word throws my update statement out. ... does work if I wrap it up in double quotes, but that means i need code ...
    (microsoft.public.sqlserver.fulltext)