//define globals $affID = 0; $orderpage = 0; if($affCookie) { //Cookie exists. set affID $affID = $affCookie; } else { //Cookie Doesn't exist. Create it with $refID if($refID) { setcookie("affCookie", $refID, time()+(60*60*24*3), "/", ".autoclubofamerica.com"); $affID = $refID; } } //affID should now be set to whichever affiliate referred this client. //if affID still equals 0 then nobody referred the client if($affID) { $conn=mysql_connect('localhost', 'root', 'travel0'); if(!mysql_select_db("affiliate",$conn)) { echo ("Cannot select database.\n"); } $sql="SELECT * FROM affiliate WHERE ref_ID = '$affID' ORDER BY ref_ID"; if(!($result=mysql_query($sql,$conn))) { echo ("Error selecting data from Affiliate table.\n"); } else { if($data=mysql_fetch_row($result)) { $affID = "refID($data[0]) - $data[1] $data[2]"; $orderpage = $data[3]; } else { $affID = 0; $orderpage = 0; } } mysql_close($conn); } ?>
![]() |
![]() |
||||||||||||
|
|||||||||||||
| |
|
||||||||||||
![]() |
| Home
| About Us | Privacy
| Contact Us |
Careers |
|
||||||||||||