Well this is progress! My sloppy semicolons seem to have been the 
problem. The error message has now moved down to line 14, which in 
Dreamweaver 4 is the closing "}" of that code block.

Since the line numbers in the error messages don't seem to be exact, the 
problem is probably in the lines immediately following the code block:

$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;
}

I'll start looking at these lines more closely now. Thanks for the help. 
I guess I was taking those error messages too literally and looking for 
the problem in the wrong place.

Vicki


In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Jack Dempsey) wrote:

> Hi Vicki,
> 
> try this:
> 
> <?
> if (!$SampFirstName || !$SampLastName || !$SampEmail)
> {
> echo "You have not entered all the required information. <br>"; #<-- you
> need a semi colon here and
> 
> echo "Please go back and try again."; #<-- another echo here.
> exit;
> }
> 
> you could also do this:
> 
> <?
> if (!$SampFirstName || !$SampLastName || !$SampEmail)
> {
> echo "You have not entered all the required information. <br> Please go back
> and try again.";
> exit;
> }
> 
> 
> Jack
>

-- 
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]

Reply via email to