Plannet1 Posted March 26, 2022 Share Posted March 26, 2022 I need help on this error message below: Parse error: syntax error, unexpected token "isset" in C:\xampp\htdocs\WaleProject\connect.php on line 8 The code is as follows: if (isset($_POST['submit'])) { if (isset($_POST['EmailAddress']) && isset($_POST['Password']) && isset($_POST['Nationality']) && isset($_POST['HomeAddress']) && isset($_POST['TelephoneNumbere']) && isset($_POST['DateofBirth']) isset($_POST['Gender']) && isset($_POST['Occupation'])){ Kindly assist, Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/314630-parse-error-syntax-error-unexpected-token-isset-in-cxampphtdocsprojectconnectphp-on-line-8/ Share on other sites More sharing options...
mac_gyver Posted March 26, 2022 Share Posted March 26, 2022 (edited) you are missing a logical operator after one/between the isset() statements. most of this typing is unnecessary. when a form has been submitted all the form fields with be set except for unchecked radio and checkbox fields, which you would detect and validate separately. are any of these inputs radio or checkboxes? If not, then that code is a waste of typing. Edited March 26, 2022 by mac_gyver Quote Link to comment https://forums.phpfreaks.com/topic/314630-parse-error-syntax-error-unexpected-token-isset-in-cxampphtdocsprojectconnectphp-on-line-8/#findComment-1594602 Share on other sites More sharing options...
requinix Posted March 26, 2022 Share Posted March 26, 2022 Also note that isset() accepts multiple arguments. Quote Link to comment https://forums.phpfreaks.com/topic/314630-parse-error-syntax-error-unexpected-token-isset-in-cxampphtdocsprojectconnectphp-on-line-8/#findComment-1594609 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.