divinedesigns1 Posted September 25, 2015 Share Posted September 25, 2015 ok, so im using wamp to do a fast php check whiles i create my scripts. now i created the entired script and im getting the following error Parse error: syntax error, unexpected 'if' (T_IF) in D:wampwwwxxxxxindex.php on line 10 as you guys tell me all the time, break down the script to make sure i dont have any errors, so im breaking down my codes and havent found any error at all so far. im up to the beginning of the script <?php // start the session session_start(); // display all errors error_reporting(E_ALL); ini_set('display_errors', '1'); // the connection include "../xx/xxxx.php" // the script for the login if(isset($_POST['submit'])){ }?> and the above script still giving the same errors, any idea? Link to comment Share on other sites More sharing options...
Don E Posted September 25, 2015 Share Posted September 25, 2015 Looks like missing semicolon for the include line. Could be it for the error. Link to comment Share on other sites More sharing options...
Ingolme Posted September 25, 2015 Share Posted September 25, 2015 All PHP statements need to be separated by semi-colons. This would fix your problem: include "../xx/xxxx.php"; Link to comment Share on other sites More sharing options...
divinedesigns1 Posted September 25, 2015 Author Share Posted September 25, 2015 All PHP statements need to be separated by semi-colons. This would fix your problem: include "../xx/xxxx.php"; Looks like missing semicolon for the include line. Could be it for the error. talk about no noticing something........thanks guys Link to comment Share on other sites More sharing options...
Ingolme Posted September 26, 2015 Share Posted September 26, 2015 A missing semi-colon is one of the most common syntax errors. Even I make the mistake all the time, just get used to finding and fixing them while testing. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now