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!
Vicki
Here's the the first part of the script in question:
<html>
<head>
<title>Sample Request Results</title>
</head>
<body>
<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.";
exit;
}
$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.";
exit;
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]