To trouble shoot this, change line 203:
$WA_redirectURL = "users_Images.php";
to:
$WA_redirectURL = "";
so that no redirect happens after updating the database.
Then add the following code for turning on error reporting at line 1:
<?php
error_reporting(E_ALL);
ini_set('display_errors','on');
?>
next add this code after the <body> tag.
Post back any PHP errors that may display and the results of the DFP debug info after testing.