The error complains about an unexpected "!", right ? What if you do
if (!isset($title)) { That's the correct syntax, you know ?... Luis ----- Original Message ----- From: "jh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 09, 2003 9:03 AM Subject: [PHP-WIN] Re: Forms-PHP-and-errors Hi, Thanks for reply. I have wrapped your code in <?php ?> like so:- <?php if !isset($title) { // Title contains no valid data $title = "" } if !isset($firstname) { // Title contains no valid data $firstname = "" } if !isset($lastname) { // Title contains no valid data $lastname = "" } > ?> called it p-6-2.php and this is the error I get:- Parse error: parse error, unexpected '!', expecting '(' in D:\web\myforms\p-6-2.php on line 4 I have used my own form which uses javascript to validate the fname and surname fields, but it still outputs the same error messages! ------------------------------------------------------------------------ Notice: Undefined variable: title in D:\web\myforms\p-6-2.php on line 11 Title is required. Notice: Undefined variable: fname in D:\web\myforms\p-6-2.php on line 17 First name is required. Notice: Undefined variable: surname in D:\web\myforms\p-6-2.php on line 23 Last name is required. Please use your browser's back button to return to the form, correct the errors, and re-submit the form. ----------------------------------------------------- If I send the output of my form to phpinfo() , I get all my form fields listed in ' PHP Variables ' in ' get ' and ' post ' and the data entered into my form is there also. In php.ini, globles is set off, like so:- register_globals=Off Like I say, I am new to php, so I haven't a clue what to do! Thanks jh -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php