unistake Posted January 28, 2009 Share Posted January 28, 2009 Hi guys, ive tried to make sence of the most efficient way to process a registration form. Ive come across so many different ways. I am trying to put all the $_POST variables in to one array like.. <?php foreach ($_POST as $field => $value){} ?> to check that they all have some value in them. However when I come to <?php if ($field == 0){echo "you must enter the following fields <br> $field<br>"; ?> The problem with this as you would have seen is that it loops continuously and also even if a value has been entered in a particular field, it will still be echoed. Is there some way to put the empty fields in to some sort of array, and then echo those values instead? Please enlighten me! thanks Link to comment https://forums.phpfreaks.com/topic/142782-making-a-register-form-simple/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.