Page 3 of 3
Posted: Tue Jun 19, 2007 1:03 pm
by superdezign
Check if that particular index of the post array is set before even displaying the result.
Code: Select all
if(isset($_POST['whatever']))
{
// Show the results of the form
}
else
{
// Show the form
}
If you want the form to always be shown, you can remove the else.
Posted: Tue Jun 19, 2007 1:08 pm
by ReverendDexter
Is there a reason why you're using isset($_POST['whatever']) to instead of empty($_POST['whatever'])?
I ask because I had issues earlier this week using isset() instead of empty() when I was looking to see if the $_POST variable had data in it. empty() worked better for what I was doing. :shrug:
-Dex
Posted: Tue Jun 19, 2007 1:11 pm
by revocause
thats awesome. it works
errors went away.
Yay .
thanks Rev and Super.
you two been the biggest help in two weeks
Its ok Scotty .. the engines have gone back to normal levels.. his brains not gonna blow
Thanks again.
Posted: Tue Jun 19, 2007 1:15 pm
by superdezign
ReverendDexter wrote:Is there a reason why you're using isset($_POST['whatever']) to instead of empty($_POST['whatever'])?
No reason in particular, other than to familiarize him with isset(). isset() has a larger range of use than empty(), although empty() would work perfectly fine in this situation.