<?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);
?>
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)
So you're saying when you post this form you see "Record inserted" displayed twice too ?
What else does page2.php contain? Is the insert query inside any form of loop or condition?