GetDotted Domains

Viewing Thread:
"Rusty PHP? Little help please"

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.

Mon 13/09/04 at 22:33
Regular
"l33t cs50r"
Posts: 2,956
Being totally stupid here, but someting wrong and I still can't see what:

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



















}

?>
Mon 13/09/04 at 22:47
Regular
"Chavez, just hush.."
Posts: 11,080
Parse error: parse error, unexpected T_STRING, expecting ']' in /home/virtual/site21/fst/var/www/html/tyla.php on line 7

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!
Mon 13/09/04 at 22:46
Regular
"NULL"
Posts: 1,384
I just copied it into DW MX and it came up with the wrong colours from line 28 onwards. Ran a W3C check on it and it confirmed it was an error at line 28. Looked at it and saw the bracket was the wrong colour, then noticed the missing '. It's amazing how such a small error has such a big effect.

Just out of curiosity, why are you overriding the old safe mode feature of variables in arrays?
Mon 13/09/04 at 22:43
Regular
"l33t cs50r"
Posts: 2,956
Nimco wrote:
> $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
Mon 13/09/04 at 22:39
Regular
"NULL"
Posts: 1,384
$email = $_POST['telNo];

Line 28 - you've missed off a closing ' in the []
Mon 13/09/04 at 22:34
Posts: 15,443
A momentous occasion - Tyla - asking for help. Cherish this post.
Mon 13/09/04 at 22:33
Regular
"l33t cs50r"
Posts: 2,956
Being totally stupid here, but someting wrong and I still can't see what:

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



















}

?>

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Thank you very much for your help!
Top service for free - excellent - thank you very much for your help.
Many thanks!
You were 100% right - great support!

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.