Jack Jackson wrote:
Kristen G. Thorson wrote:
You said "If the user makes changes, those changes get error checked
but do not become part of the sql query." Where in your code is it
failing to become part of the query? Put a check at each level and
see where *exactly* it fails to get deep enough to become one with
the query. Also, I'm confused. I asked if the query was what you're
expecting, and you answered yes, which implies the data becomes part
of the query.
Thanks for this; yes I was confused before and thank you for the
clarification.
Now I am confused by how to check the logic: I echo out the sql as it
is built, and if I'm going forward in the questionnaire it shows
clearly but
$qidlist_sql="DELETE FROM teresa WHERE q_id IN (" .
(implode(",",$qidlist)) . ");";
echo "<br /><br />";
echo "<br />\$ cqidlist_sql:" . $qidlist_sql . "<br />";
$q_a_sql="INSERT INTO teresa (u_id, q_id, a_id )
VALUES " . (implode(",",$qanda)) . ";";
mysql_query($qidlist_sql);
echo "<br /><br />";
echo "<br />\$ q_a_sql:" . $q_a_sql . "<br />";
if($q_a_result = mysql_query($q_a_sql))
{
unset($_SESSION['required_fields']);
$cat = $_POST['cat']+1;
include_once(QUESTIONS . 'q.inc');
}
shows NOTHING if I hit the BACK button. I'm still not seeing where
the logic error is which makes it so that when I hit the BACK button
it loses the plot.
Sorry for my misunderstanding
JJ
Keep going backwards. It looks like maybe you've got an IF statement
that you're not getting past. Find where that is, and why it's
evaluating to false. If it's outputting *nothing*, then you're not
evening reaching those echo statements. Make a note after every IF
statement, something like
echo "Inside if( this == that )";
So you know which blocks of code are being processed.
kgt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php