Justtechjobs.com Find a programming school near you






Online Campus Both


php-db | 2001062

Re: [PHP-DB] How do I keep the values of objects when refreshing page? From: Hugh Bothwell (hugh_bothwell <email protected>)
Date: 06/28/01

"Hector M Banda" <hector <email protected>> wrote in message
news:3B391C6D.387CDD28 <email protected>
> 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.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>