Patrick3002 Posted August 2, 2007 Share Posted August 2, 2007 Hi, if i remember correctly you would use: if ( !$pBy || !$lyric || !$artist || !$song ) { echo "<font color=red>[sTATUS]</font>: Be sure to fill in all of the fields."; } else { To check if: $pBy=$_POST['pBy']; $lyric=$_POST['lyric']; $artist=$_POST['artist']; $song=$_POST['song']; Are all entered in... in my case, this is incorrect. It will add to the db if the first/second field has been entered, doesn't matter about the others... Is there an alternative to check to see if all required fields have been entered? Any help is greatly appreciated, thanks!!! ~Patrick Quote Link to comment https://forums.phpfreaks.com/topic/62969-checking-fields/ Share on other sites More sharing options...
teng84 Posted August 2, 2007 Share Posted August 2, 2007 use isset sample if (!isset(your post) || etc....) Quote Link to comment https://forums.phpfreaks.com/topic/62969-checking-fields/#findComment-313586 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.