RevKev
05-17-2001, 04:48 AM
Here's what I want to do:
I have a form for people to send prayer requests being handled by prayer_response.php. I want to require certain fields to be filled out. I would like to use an "if" clause that would basically do:
if ($prayer == null || $name == null || $email == null)
{
echo "<p><strong>You must complete all fields.<br/>Please return to the last page and try again.</strong></p>";
require("footer.inc");
exit;
}
I'm guessing the part inside the {} is just fine. It's the if clause that I'm not sure about. Obviously the word "null" is just to let you know what I'm trying to do. There must be some neat way of doing this, though.
If you know, please let me know. :)
Thanks!
I have a form for people to send prayer requests being handled by prayer_response.php. I want to require certain fields to be filled out. I would like to use an "if" clause that would basically do:
if ($prayer == null || $name == null || $email == null)
{
echo "<p><strong>You must complete all fields.<br/>Please return to the last page and try again.</strong></p>";
require("footer.inc");
exit;
}
I'm guessing the part inside the {} is just fine. It's the if clause that I'm not sure about. Obviously the word "null" is just to let you know what I'm trying to do. There must be some neat way of doing this, though.
If you know, please let me know. :)
Thanks!