Hi everybody,
I am having a problem with GET variables. Basically I have not
found a way to clear them so they are reset to "" if the user reload
the page.
Here is the speudo code:
>?php
session_start();
If ($Faction=="Add to Data")
{ Add_to_data(); }
<html>...
<form...method="POST" action='this_script?with session_id()'>
..
<input...>
<input type='submit' name=Faction value='Add to Data'>
</form>
<?PHP
function Add_to_data()
{
Add data to mysql DB
session_unregister('Faction');
session_destroy;
}
?>
The above speudo script work fine and when the user click 'Add to
Data', the data is added to my database. Howver, the
session_unregister and session_destroy do not clear the variable
Faction and its value. Therefore if the user click Reload on the
browser, the data gets added again.
What is my problem,
Thanks in advance
Claude
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php