I have done something similar lots of times, but I seem to be doing something wrong this time.
I want users to be able to update their own info.
- I retrieve the old data from mysql
- fill a form automatically with the data
- user makes changes, and submits form. In this case, script calls $PHP_SELF.
- For some strange reason, the data disappears after the script calls itself.
All the form fields have the VALUE attribute.
The FUNCTION that shows the form has all VARIABLES as shown below:
class form
{
function ShowForm($login)
{
...
?>
<input type="text" name="login" value="<?php echo "$login"; ?>">
<input type="submit" value="submit">
<?php
}
}
Then to show the form, I do:
$form_show = new form;
$form_show->ShowForm($login);
The form is shown correctly at first, with the data filled in.
But when the script calls itself, the form shows up empty. Any help will be appreciated.
Richie.