If the row has a unique id, place that unique id in a session variable.
// do form processing
// insert query
$_SESSION['this_form_name_is_submitted'] = mysql_insert_id();
// you already submitted!
That's the easiest way I could think to do it. Of course you don't have to use the insert id at all, a simple boolean will do, but that might have other useful applications.
A PHP/C-Client/PEAR solution for webmail