|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Here's my problem. I'm in the process of writing my first "real" database interface, and i keep running into this problem, both in the PHPMyAdmin and my own scripts. The script works as it should when i first load it, however when try to access the script after that, it keeps the values i originally typed. I get the same results when i hit the "reload" button. I am running PHP 4.3 with Apache 2 on a win2K OS. Is this a script problem or a problem with IE or am i missing something else?
Thanks Dave |
|
#2
|
||||
|
||||
|
You're probably going to need to post some code.
|
|
#3
|
|||
|
|||
|
sorry about that
Here's the script i'm having a problem with now:
<html> <body> test: <?php if ($_POST["submit"]) { // process form $db = mysql_connect("localhost", "root"); mysql_select_db("reverve",$db); $sql = "INSERT INTO comics (id,name,company,instock) VALUES ('$id','$name','$company','$instock')"; $result = mysql_query($sql); echo "Thank you! Information entered.\n"; } else{ // display form ?> <form method="post" action="<?php echo $PHP_SELF?>"> Id:<input type="Text" name="id"><br> Title:<input type="Text" name="name"><br> Company:<input type="Text" name="company"><br> In Stock:<input type="Text" name="instock"><br> <input type="Submit" name="submit" value="Enter information"> </form> <?php } // end if ?> </body> </html> |
|
#4
|
||||
|
||||
|
Only thing I can think of is that at some point, maybe you clicked a Windows option to remember form fields you've filled in. There's nothing in the code (and certainly nothing in PHPMyAdmin's code) that should cache the data you've filled out.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Post data won't clear |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|