Page 1 of 1
Resetting http_post_vars
Posted: Fri Aug 20, 2004 4:25 pm
by mjstehn
I have a page that basically you click on a couple of dymamic lists and then submit. It will insert the records into the database. The HTTP_POST_VARS are set and if the page refreshes I get a duplicate entry error for the database. Is there anyway to reset these after the record has been inserted into the database? Thanks,
Mike
Posted: Fri Aug 20, 2004 5:25 pm
by William
$HTTP_POST_VARS = "";
Maby that will work I never use that function so I would have to look it up if that dont work.
Posted: Fri Aug 20, 2004 7:25 pm
by evilmonkey
I suggest unset($HTTP_POST_VARS);
Also, I would suggest using the $_POST autoglobal istead, as $HTTP_POST_VARS is long depreciated.
Posted: Fri Aug 20, 2004 9:41 pm
by d3ad1ysp0rk
set a session variable that says they've already submitted it once.
Posted: Sat Aug 21, 2004 3:07 pm
by tim
isset to check for a session var to see if its already present would be my route.
Posted: Sat Aug 21, 2004 3:13 pm
by d3ad1ysp0rk
*blink*
uhh..

Posted: Sat Aug 21, 2004 3:16 pm
by tim
is there something in your eye?
I mentioned the isset function in case he/she wasnt aware of the function. I know you already suggested the session var, i was agreeing.
dont beat me up