Jump to content

What should go here?


forumnz

Recommended Posts

Try out this
Put this code after ur array in which u defined the $required_fields

$required_fields define ur fields like this
[code]
$required_fields = array( 'name','password','username', '', 'email');
[/code]
Than add this code
[code]
foreach ($required_fields as $field) {

if (!isset($_POST[$field]) || empty($_POST[$field]))
error("One or more required fields were left blank. \\n Please fill them in and try again.");
  }
[/code]
Link to comment
https://forums.phpfreaks.com/topic/32659-what-should-go-here/#findComment-151990
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.