Thank you for your understanding.

Your site id is $siteid
go is $go
"; $getlinks ="SELECT * FROM hoppers WHERE ID = $siteid"; $getMylinks = mysql_query($getlinks,$connection) or die("coundn't verify link database 1"); $num_rows = mysql_num_rows($getMylinks); } else { $referrer = $HTTP_REFERER; $ref = split("/",$referrer); $ref1= $ref[2]; //$ref2=ereg_replace("wordpress.com","",$ref1); $ref = "http://$ref1"; // echo "TESTING: this is not an error, Jen is working on the code for just a moment.
Thank you for your understanding.

You came from: $referrer and ref is $ref1 and ref2 is $ref2
go is $go
"; $getlinks ="SELECT * FROM hoppers WHERE url LIKE \"%$ref1%\""; $getMylinks = mysql_query($getlinks,$connection) or die("coundn't verify link database 1"); $num_rows = mysql_num_rows($getMylinks); } if(empty($num_rows)) { $getlinks ="SELECT * FROM maininfo LIMIT 0,1"; $getMylinks = mysql_query($getlinks,$connection) or die("coundn't verify link database 1"); while ($row = Mysql_fetch_array($getMylinks)) { $URL = $row['URL']; } mysql_close(); header("Location: $URL"); } while ($row = Mysql_fetch_array($getMylinks)) { $linkID = $row['ID']; $clicks = $row['clicks']; $newclick = ($clicks + 1); $sql = "UPDATE hoppers SET clicks='$newclick' WHERE ID=$linkID"; $result = @mysql_query($sql,$connection) or die("Couldn't update count."); //echo "site id is $linkID
"; if ($go == "b") { $getlinks2 ="SELECT * FROM hoppers WHERE hide != 'Y' AND ID < $linkID AND display > '0' ORDER BY ID DESC LIMIT 1"; //echo "go id prev
"; } else { $getlinks2 ="SELECT * FROM hoppers WHERE hide != 'Y' AND ID > $linkID AND display > '0' ORDER BY ID ASC LIMIT 1"; //echo "go id next and id is $linkID
"; } $getMylinks2 = mysql_query($getlinks2,$connection) or die("coundn't verify link database 2"); $num_rows = mysql_num_rows($getMylinks2); // echo "numsrows is $num_rows"; if(empty($num_rows)) { if ($go == "b") { $getlinks2 ="SELECT * FROM hoppers WHERE hide != 'Y' AND display > '0' ORDER BY ID DESC LIMIT 0,1"; } else { $getlinks2 ="SELECT * FROM hoppers WHERE hide != 'Y' AND display > '0' ORDER BY ID ASC LIMIT 0,1"; // echo "f"; } $getMylinks2 = mysql_query($getlinks2,$connection) or die("coundn't verify link database 3"); } while ($row = Mysql_fetch_array($getMylinks2)) { $url = $row['url']; } //$url = $ref; //echo "next url is $url"; mysql_close(); // echo "


going to $url"; header("Location: $url"); /* to test later for target attribute on link... $path = "/path/to/script.php"; $data = "data1=value1&data2=value2"; $data = urlencode($data); header("GET $path HTTP/1.1\r\n" ); header("Content-type: application/x-www-form-urlencoded\r\n" ); header("Content-length: " . strlen($data) . "\r\n" ); header("Connection: close\r\n\r\n" ); header($data); */ } } ?>