Re: How do I keep the values of objects when refreshing page?

From: Date: Thu, 28 Jun 2001 17:33:21 +0000
Subject: Re: How do I keep the values of objects when refreshing page?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-9973@lists.php.net to get a copy of this message
"Hector M Banda" <hector@need-info.com> wrote in message news:3B391C6D.387CDD28@need-info.com... > Hi all, > > My page is getting the values and the submits itself displaying the > information but the original selection is gone showing the objects with > no info. ... so you have a form which submits values to a script and when you return the form fields are blank? How do you return to the form? Does the submit script forward you to it again? If so, you will have to pass the parameters back again and change the form code to fill the values in, something like === form.php === <form action="submit.php" method="post"> <br>Name: <input type="text" name="name" value="<?= $name ?>"> <br>Phone: <input type="text" name="phone" value="<?= $phone ?>"> <br><input type="submit"> </form> === submit.php === <?php storeValues($name, $phone); header("Location: form.php?name=$name&phone=$phone"); ?> You will also need to consider some method for preventing duplicate entries.

« previous php.db (#9973) next »