G-Force
asked on
Clearing away the values...
Hi, anyone knows how to clear away values after i accessed the page.
http://localhost/example/edit_profile.php?name=Jon&add=the+world&email=abc@def.com&updateBtn=Update
I don't wan this anymore.
How can I make it just http://localhost/example/edit_profile.php again??
-Rgds-
http://localhost/example/edit_profile.php?name=Jon&add=the+world&email=abc@def.com&updateBtn=Update
I don't wan this anymore.
How can I make it just http://localhost/example/edit_profile.php again??
-Rgds-
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you could always change the header to change the location.
Header("Location: index.php");
Header("Location: index.php");
Instead of passing your variables through the link, pass them in a form with hidden fields, like this
<FORM METHOD="POST" ACTION="edit_profile.php">
<INPUT TYPE="hidden" NAME="name" VALUE="Jon">
<INPUT TYPE="hidden" NAME="add" VALUE="the+world">
<INPUT TYPE="hidden" NAME="email" VALUE="abc@def.com">
<INPUT TYPE="image" src="/images/submitbutton. gif" border="0" name="updateBtn" id="gifSubmit" value="Update">
</FORM>
Then in the URL you won't see the variables anymore.
<FORM METHOD="POST" ACTION="edit_profile.php">
<INPUT TYPE="hidden" NAME="name" VALUE="Jon">
<INPUT TYPE="hidden" NAME="add" VALUE="the+world">
<INPUT TYPE="hidden" NAME="email" VALUE="abc@def.com">
<INPUT TYPE="image" src="/images/submitbutton.
</FORM>
Then in the URL you won't see the variables anymore.
I think his problem is that anyone has data from him in this way an know hi want this data to be deleted. Thats rarely possible. You can try whether the data is change when you leave the name and change all other variables, but if this do not work there is noch chance to clear that data in database.
http://localhost/example/edit_profile.php?name=Jon&add=0&email=0&updateBtn=Update
http://localhost/example/edit_profile.php?name=Jon&add=0&email=0&updateBtn=Update
unset(valuename);
laurly