CoreyR Posted March 31, 2007 Share Posted March 31, 2007 I've been trying to figure this out and now I'm lost. On my page, I have each link set like this: http://www.fastqualify.com/about_amanda.php?pageid=about_amanda&prevsiteid=unknown&userid=2768 in my header.php which is called on every page it looks like: <? mysql_connect("mysql", "xxxx", "xxxx") or die(mysql_error()); mysql_select_db("data") or die(mysql_error()); $pageid = $_GET['pageid']; $userid = $_GET['userid']; $prevsiteid = $_GET['prevsiteid']; mysql_query("INSERT INTO `usermarketing` VALUES ('', '$pageid', '$userid', '$prevsiteid')")or die(mysql_error()); ?> For some reason the data from the URLs is entering into to SQL database twice for each page. Any ideas? Thanks Link to comment https://forums.phpfreaks.com/topic/45006-solved-ok-im-stuck/ Share on other sites More sharing options...
CoreyR Posted March 31, 2007 Author Share Posted March 31, 2007 WOW, I commented this line out <code>mysql_query("INSERT INTO `usermarketing` VALUES ('', '$pageid', '$userid', '$prevsiteid')")or die(mysql_error());</code> and uploaded, then uncommented and re uploaded. And it seems to work fine now. Only one record per URL click. Link to comment https://forums.phpfreaks.com/topic/45006-solved-ok-im-stuck/#findComment-218481 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.