//<br/>Details: ' $_POST[;details'] ' . <br/>
Quote:
>
>
shouldnt that be
>
>
//<br/>Details: ' $_POST['details'] ' . <br/>
Yup; I'd been doing so much butchering and occasionally having to retype
things that crept in on me and I didn't catch it when I did the
copy/paste. I also lost a "." (concat) in the last two lines, just
before the vars. Stupid mistakes I know, but at least those are easier
to find<g>.
Quote:
>
>
also i think that this may work, im not 100% on it but give it a go
and post back
No, those are no help, I'm afraid. I tried each one just for grins so
I'd be sure I was right, but each resulted in an error msg, usually the
same one.
I did find the problem; I'd mangled a variable back in earlier code.
'Respond' should have been 'contact'. That and the missing "." at the
same time resulted in confusion for me. I had a feeling it was going to
turn out that way, but what I posted for was basically to see if the
format of the mail() was basically correct.
Here's how I read the mail() layout: if I'm wrong I'm sure someone will
correct me. I'm only a neophyte at PHP so far.
The double quotes don't work because where you placed them because they
created mismatches quotes. The first double quote and the first single
quote below are the first "set" of quotes. The lines are just laid out
a little strangely IMO. Then just count the quotes in pairs to the end
and you see why the last one should be a single quote too.
What I find interesting about the mail() layout below, which seems to
be consistant between authors, is the format is really just one long
line.
If you re-arrange it as below, the quote paring is a little more
obvious:
$mail_body = "<br>User: ' .
$email .' submitted a form re: BAD LINK <br>Zip: ' .
$_POST['zipcode2'] .
'<br <br>City: '.
$_POST['city'] .
'<br<br>Link: '.
$_POST['page'] .
'<br <br>Link Wording: ' .
$_POST['wording'] .
'<br<br>Details: '
$_POST[;details'] .
'<br<br>Response? '
$_POST['respond'] . '<br" ;
mail($mailuser, 'Form Sent', $header, $mail_body );
So now one can see why the quotes are mismatched. I thought for awhile
the first/last quotes were a container too somehow, but it turns out
they aren't; it's just the way it works out for the way it's written;
it's really just one long line of code. I have to wonder why {} aren't
used to clarify things, but I haven't have the chance to try it. Maybe
mail() doesn't like a lot of things I'm not aware of yet.
Like I said, if all that's a wrong assessment, I'm sure someone will
pick up on it and let us know<g>.
I'm finally catching on to how to troubleshoot and use PHP's
sometimes pretty cryptic error messages. It seems one needs more of an
attitude than a literal mind to interpret the errors.
Regards,
Twayne
==== original snip posted ====
$mail_body = " <================================ single quote
<br>User: ' . $email .' submitted a form re: BAD LINK '<======= remove
quote
<br>Zip: ' . $_POST['zipcode2'] . '<br>
<br>City: '. $_POST['city'] . '<br>
<br>Link: '. $_POST['page'] . '<br>
<br>Link Wording: ' . $_POST['wording'] . '<br>
<br>Details: ' $_POST[;details'] . '<br<================= add ".",
fix ";" to single quote
<br>Response? ' $_POST['respond'] . '<br" ;<============= single
quote, add "."
mail($mailuser, 'Form Sent', $header, $mail_body );