Jump to content

[SOLVED] T_STRING Error


andrew6607

Recommended Posts

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!!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.