The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
Error is: parse error, unexpected T_STRING, expecting ']' on line 29
Code:
if ($_POST)
{
$name = $_POST['name'];
$email = $_POST['telNo];
$comments = $_POST['comments']; ***THIS IS LINE 29***
$message = "Message from $name ($telNo)\n\nComments:\n\n$bodytext";
mail("[email protected]", "Enquiry from website", $message);
echo "
Thank you for your enquiry
\n";}
else
{
?>
Enquiry Form
}
?>
I get a different error.
-
Would I be right in saying that
$email = $_POST['telNo];
should be
$email = $_POST['telNo'];
?
--
I don't care if I'm slow and didn't see the other messages.
I'm right. Woooooo!
Just out of curiosity, why are you overriding the old safe mode feature of variables in arrays?
> $email = $_POST['telNo];
>
> Line 28 - you've missed off a closing ' in the []
Now I feel like a total @rse. Put it trhough Zend, and though there was something iffy but the fact it was all higlighted in red. Add the missing ' and suddenly colour syntax returns!
It's been a long day
Line 28 - you've missed off a closing ' in the []
Error is: parse error, unexpected T_STRING, expecting ']' on line 29
Code:
if ($_POST)
{
$name = $_POST['name'];
$email = $_POST['telNo];
$comments = $_POST['comments']; ***THIS IS LINE 29***
$message = "Message from $name ($telNo)\n\nComments:\n\n$bodytext";
mail("[email protected]", "Enquiry from website", $message);
echo "
Thank you for your enquiry
\n";}
else
{
?>
Enquiry Form
}
?>