I would recommend re-writing the code that requires register_global s to be enabled. It is a security risk, which is most likely the reason it was disabled on your server, and having your code depend upon it is very very bad!
If, however, you are willing to risk it, check out the extract() function, which can be used to extract the super-globals at runtime, much like the register_global s property does.
I've edited the title of this thread to make it a little clearer.
Please avoid using words like 'help' in your thread titles, as they make it less appealing to the Experts, as well as our other members.
I would recommend re-writing the code that requires register_global s to be enabled. It is a security risk, which is most likely the reason it was disabled on your server, and having your code depend upon it is very very bad!
How do i re-rite it? Or where do i start the register globals requirement was in the code before i started...
[PHP]<?php
session_start() ;
$login = $_REQUEST['login'];
$password = $_REQUEST['password'];
$sql = "select * from users where login = '$login' and password = '" . sha1($password) . "'";
$result = mysql_query($sq l ,$db);
$loggedin = true;
$upwd = $password;
$msg = "<p align='center'> <font size='2' face='Arial'><b r />
<b>Welcome back</b>, You will be redirected in <font color='#FF0000' >3</font> seconds!<br />
<br />
<img src='images/ajax_loading.gi f' alt='Loading' width='32' height='32' /><br />
<br />
Or <a href='index.php '>Click here</a> if you don't want to wait!</font></p>";
session_registe r("loggedin") ;
session_registe r("upwd");
session_registe r("uid");
session_registe r("uname");
} else {
$loggedin = false;
$upwd = "";
$uid = "";
$uname = "";
$msg = "<img src='images/invalid.gif' width='402' height='107' /><br /><b><font color='#FF0000' >Sorry,</font></b> that ID or Password is not valid.<br /><br /><br />If you have forgotten your password <a href='forgot.ph p'>Reset Password</a>. <br />If you are a new user you will need to <a href='newuser.p hp'>Create A New Account!</a>";
Internal Server Error
The server encountered an internal error or misconfiguratio n and was unable to complete your request.
Please contact the server administrator, [removed] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Last edited by pbmods; Sep 21 '07, 12:08 AM.
Reason: Removed email
Comment