try adding the following code at line 1 of the detail page:
<?php @session_start(); ?>
on the insert page, try changing line 67:
header("Location: ".$WA_redirectURL);
to:
session_commit();
header("Location: ".$WA_redirectURL);
if you continue to have a problem, add the following code just before the </body> to help troubleshoot:
<?php
echo("<pre>");
var_dump($_SESSION);
echo("</pre>"):
echo("SQL: ".$query_WADAgallery);
?>
this will write the session contents and the recordset to the page, post this back