I used to write my codes with register globals = on, now I have to move my script to a different maschine with register globals = off. Anyone can tell me what I should change from my function below?
I mean, I have 2 global variables here i.e : $USR_TBL and $ERR_NO_USERNAME which I declared in a different file. I can have the $username value from $_POST['username'], but how about the other 2?
function check_user($username)
{
global $USR_TBL,$ERR_NO_USERNAME;
$conn=db_connect();
$result=mysql_query("SELECT * FROM $USR_TBL WHERE username='$username'");
$row=mysql_fetch_array($result);
if($result){
return $row[username];
}else{
notify_user("$ERR_NO_USERNAME","error");
}
}