bubbles19518
02-02-2007, 04:13 AM
So i have an image that checks to see if your on AIM or not. In the process I log your aim username, the time that the image was viewed, and your myspace friendid. For whatever reason my mysql is not working, the code looks fine to me and all the tables/columns exist. Can anyone tell me what Im doing wrong?
$link = mysql_connect("192.168.2.7","myspace_aim","*****");
mysql_select_db("myspace_aim");
$sql = "SELECT * FROM users WHERE mid = '$ref' OR ausr = '$username'";
$result = mysql_query($sql);
$now = time();
$sql = "INSERT INTO `users` ( `mid` , `ausr` , `when` ) VALUES ('$ref', '$username', '$now')";
mysql_query($sql);
mysql_close($link);
$ref and $username are defined earlier in the script.
$link = mysql_connect("192.168.2.7","myspace_aim","*****");
mysql_select_db("myspace_aim");
$sql = "SELECT * FROM users WHERE mid = '$ref' OR ausr = '$username'";
$result = mysql_query($sql);
$now = time();
$sql = "INSERT INTO `users` ( `mid` , `ausr` , `when` ) VALUES ('$ref', '$username', '$now')";
mysql_query($sql);
mysql_close($link);
$ref and $username are defined earlier in the script.