Jump to content

register_globals


Miss-Ruth

Recommended Posts

When I turn register_global is turned off (register_argc_argv is also set to off), this script won't work. How can I have register_globals turned off and make this work for me. Any help is highly appreciated.

 

 

<?php
$bd_me = mysql_bd_meect("localhost","db_me","pw_me");
mysql_select_db("db_me");

$query =sprintf("SELECT * FROM db WHERE unamename = '%s' AND stus = 'Banned'", mysql_real_escape_string($uname));
$query_new = mysql_query($query);
if(mysql_num_rows($query_new)) {
$login = "Sorry.";
echo($login);
} else {

$result=sprintf("SELECT * FROM  db WHERE unamename = '%s' AND password ='%s'", mysql_real_escape_string($uname), mysql_real_escape_string($password));
$resultf = mysql_query($result);
if(mysql_num_rows ($resultf) == 0) {
$login = "Failed.";
echo($login);
} else {
$row = mysql_fetch_array($result);
$uname=$row['uname'];
$password=$row['password'];
$login = "$uname=" . $uname . "$password=" . $password . "Successful.";
echo($login);
}
}
?>

 

Is there any other settings that needs to be changed in the php.ini to make this code work while register_globals is turned off?

Link to comment
https://forums.phpfreaks.com/topic/221535-register_globals/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.