Jump to content

issue with unexpected if


divinedesigns1

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...