Not only am I new to PHP, I'm new to programming altogether. I'm trying 
to take it step by step, and my first big experiment was the script 
below, used to enter info from a form into a mySQL database. I get the 
following error message when it runs:

Parse error: parse error, expecting `','' or `';'' in 
/www/ideasforimages/request_sample.php on line 8

I've been stuck on this all afternoon. The opening PHP tag is what's on 
line 8. I've run other simple scripts with the same tag, so it doesn't 
seem to be a problem with the server set-up or application. Any help 
would be greatly appreciated!


Here's the the first part of the script in question:

<title>Sample Request Results</title>

<p>Thank you for requesting a sample. Here it is.</p>

if (!$SampFirstName || !$SampLastName || !$SampEmail)
echo "You have not entered all the required information. <br>"
"Please go back and try again.";

$SampFirstName = addslashes ($SampFirstName);
$SampLastName  = addslashes ($SampLastName) ;
$SampEmail = addslashes ($SampEmail);

 $db = mysql_connect ("hostname", "user", "password");

if (!$db)
echo "Error: Could not connect to database. Please try again later.";

PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to