View Single Post
Old November 8th, 2007, 4:21 PM   #5 (permalink)
jdcopelin
Surpass Fan
Comfy Contributor
 
jdcopelin's Avatar
 
Joined in Feb 2004
Lives in Norfolk, England
Hosted on Pass32
167 posts
Gave thanks: 23
Thanked 19 times
Hello Sharon,
I see H has posted some code in the other thread about this and you said you didn't understand it. Basically without register globals, you need to declare (or register) the name of a variable before you use it (see the code in blue). The code in red is what fails when register globals is disabled. So, you need to create lines similar to the blue code for each variable that isn't registered.

Code:
$nextID = $ID;
$age = $_GET['age'];
$sql = "SELECT * FROM Downloads WHERE age = '$age'";
if($nextID != "")
    {
    $sql .= "&& skinID <= '$nextID'";
    }
$sql .= "ORDER BY skinID desc LIMIT 8";
$getSkin = mysql_query($sql, $linkID);
// echo "$sql";

while($Downloads = mysql_fetch_array($getSkin))
     if ($age == "$age")
       {
Regards
Jonathan
__________________
Server: Pass32 and dedicated server
jdcopelin is offline   Reply With Quote
This user thanks jdcopelin for this great post!
SharonQ27 (November 11th, 2007)