Use unset () to reset the variable values and $_POST to set the values. As long as there's no other, unacceptable access to your server, you'll be in a good position, other security considerations aside. If any other latent $_POST values exist, what could they do? And if they were to do anything, could they not be reset easily?
> [Original Message] > From: Angelo Zanetti <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Date: 11/23/2004 12:17:37 AM > Subject: Re: [PHP] $_POST['xxx'] = "blabla" ? > > I speak under correction but the reason could be that if someone tries to hack your site, for example I post to your HTML page, you want to check it your $_POST contains a certain variable (which may be hidden) > > Not really sure besides that > > > > >>> Perry Jönsson <[EMAIL PROTECTED]> 11/22/2004 10:57:23 PM >>> > Jay Blanchard wrote: > > [snip] > > What is the difference between these two examples? > > Both works fine for me. > > > > > > > > 1. if ($_POST['submit'] == 'Login') { > > ... > > ... > > } > > > > 2. if (isset($_POST['submit']) { > > ... > > ... > > } > > [/snip] > > > > One is checking if $_POST contains a specific value, the other just checks to see if it contains a value. If $_POST['submit'] contains 'foo' is ISSET. Make sense? > > > Maybe a daft question but why would you like to check for a specific value? > > Can you give an example when this is a good thing to do? > > /PJ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -------------------------------------------------------------------- > Disclaimer > This e-mail transmission contains confidential information, > which is the property of the sender. > The information in this e-mail or attachments thereto is > intended for the attention and use only of the addressee. > Should you have received this e-mail in error, please delete > and destroy it and any attachments thereto immediately. > Under no circumstances will the Cape Technikon or the sender > of this e-mail be liable to any party for any direct, indirect, > special or other consequential damages for any use of this e-mail. > For the detailed e-mail disclaimer please refer to > http://www.ctech.ac.za/polic or call +27 (0)21 460 3911 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php