View Single Post
  #3 (permalink)  
Old 2004-06-26, 12:17 AM
TheSource
Guest
 
Posts: n/a
Default

Alright, here is the entire section of code for that error, though now, all of the scripts I have, that did work, have similar errors... so I think i've done something with the installation, rather than the code, because I havent edited the actual in any way.

session_start();
include 'mysql_connect.php';
$username = $_POST['username'];
$password = $_POST['password'];
$sql = mysql_query("SELECT * FROM user WHERE username='$username' AND password='$password'");
$login_check = mysql_num_rows($sql);

if($login_check > 0){
while($row = mysql_fetch_array($sql)){
foreach( $row AS $key => $val ){
$$key = stripslashes( $val );
}
session_register('username');
$_SESSION['username'] =$username;
session_register('user_id');
$_SESSION['user_id'] = $user_id;
$log = "UPDATE user SET loggedin='yes' WHERE (username='$username')";
mysql_query($log);

include 'logfresh.php';
}
}
Reply With Quote