Ive got this script to insert the URL someone has requested if they are using Firefox. But its not working. Can anyone spot the problem? <?php $con = mysql_connect("localhost","user","pass"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("db", $con); $req = .$_SERVER['REQUEST_URI']; if(strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox/3.0.4') !== false) { $req = .$_SERVER['REQUEST_URI']; mysql_query("INSERT INTO agent (firefox) VALUES ('$req')"); } ?> PHP:
Hi, didn't try, but why the dot is there?? I would use only - $req = $_SERVER['REQUEST_URI']; If there's some other problem, can you post the error or warning you get??