- Impact
- 18
I have various scripts for my website, kinda like this one:
It all works, but it seems to be putting 2 copies into the database! argh!!!
eg:
It does this with another of my scripts as well. Is it something to do with the way I am coding?
Thanks for your help
Tom
PHP:
// get a search_bar referer if there is one...
if(isset($_GET['sbr'])){
$dbc = mysql_connect("localhost", "blah", "blah");
mysql_select_db("blah",$dbc);
$sbr = addslashes(urldecode($_GET['sbr']));
$sql = "INSERT INTO searchbar_referers (id, url, date) VALUES (NULL, '$sbr', NOW())";
$result = mysql_query($sql);
if(!$result){
echo "something wrong";
}
}
eg:
Edit Delete | 2 referrerurl.com 2006-06-03
Edit Delete | 3 referrerurl.com 2006-06-03
It does this with another of my scripts as well. Is it something to do with the way I am coding?
Thanks for your help
Tom




