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