One INSERT generates two records
Posted: Tue Aug 17, 2004 1:56 pm
I have these instructions
The issue is that if I load these page directly in the browser it works fine, inserts one record. But if this page loads from a link of another page, it inserts two records. In fact, the tests I have performed, it executes twice (I know this because I've tried to insert data as a result of an operation and the records inserted are consistent with the operation)
Please Help
Code: Select all
<?php
$link = mysql_connect() or die("Unavailable connection : " . mysql_error());
mysql_select_db("cart") or die("Unavailable BD.");
mysql_query ("insert into tintas(tin_name) values ('Magenta')" , $link);
echo "Record inserted";
mysql_close ($link);
?>Please Help