Jump to content

Checking fields...


Patrick3002

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/62969-checking-fields/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.