View Full Version : PHP Clear Form on Reload
headznet
February 22nd, 2007, 07:50 PM
I created a comment form and was wondering how you can clear the _POST data so when you reload the page it won't resubmit it. Did I mention I was a n00b.
bwh2
February 22nd, 2007, 10:00 PM
make the value attribute in the input tag = "".
borrob
February 23rd, 2007, 03:16 AM
$_POST['somevalue'] = "";
bwh2
February 23rd, 2007, 07:48 AM
^ that's not what i mean. i mean just make that the default in your (X)HTML form.
borrob
February 23rd, 2007, 07:53 AM
Please explain a bit more about what you are trying to do because i don't understand what you mean ......
evildrummer
February 23rd, 2007, 07:57 AM
I think he means on the value input have it like this:
<form method="post" action="file.php">
<input type="text" value="" />
</form>
of course it would be easier if you showed some of the code you are using.
bwh2
February 23rd, 2007, 08:04 AM
^ evildrummer's got it. that just clears any values in the input box on page load.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.