andrew6607 Posted January 29, 2008 Share Posted January 29, 2008 Hello I cant Figure Out What is Going On here. Below is my code. I am Writing a Login System. <?php require_once('includes/config.php'); mysql_connect( $db_host, $db_username, $db_password or die( "MySQL Said: ". mysql_error() ) mysql_select_db( $db_database ) or die( "MySQL Said: ". mysql_error() ); $username = $_POST['username']; $password = $_POST['password']; $sql = "SELECT * FROM $table WHERE username='$username' and password='$password'"; $result = mysql_query( $sql ); $count = mysql_num_rows( $result ); if( $count==1){ session_register('username'); session_register('password'); header( 'location:memberarea.php' ); }else{ echo 'Sorry We Were Not Able to Log you in. Either Your Username or Password is wrong. Or Their is a major error in this system'; } ?> And the Error its gives is Parse error: syntax error, unexpected T_STRING in C:\Users\Andrew Erhardt\Projects\Web\membersystem\validate.php on line 7 ??? ??? ??? ??? Thanks Ahead Of Time!! Quote Link to comment Share on other sites More sharing options...
revraz Posted January 29, 2008 Share Posted January 29, 2008 Missing semi colon or die( "MySQL Said: ". mysql_error() );<----- Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted January 29, 2008 Share Posted January 29, 2008 for the future if you have a line number error show us which line is that line first! Quote Link to comment Share on other sites More sharing options...
andrew6607 Posted January 29, 2008 Author Share Posted January 29, 2008 Ok it fixed that line. Now I cant figure out. Whats its yelliing about now! or die( "MySQL Said: ". mysql_error() ); Parse error: syntax error, unexpected ';' in C:\Users\Andrew Erhardt\Projects\Web\membersystem\validate.php on line 5 > > Quote Link to comment Share on other sites More sharing options...
revraz Posted January 29, 2008 Share Posted January 29, 2008 Missing ) mysql_connect( $db_host, $db_username, $db_password ) <--- Quote Link to comment Share on other sites More sharing options...
andrew6607 Posted January 29, 2008 Author Share Posted January 29, 2008 :P OOps why didnt i see that thanks alot! :-\ Quote Link to comment 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.