DrFishNips Posted June 29, 2009 Share Posted June 29, 2009 You know the way some sites when your signing up and you forget to fill in a required field it sends you back to the form and the fields you missed then have red asterixes beside them. How do they do it? I was going to use sessions but thats causing me problems so I need an alternative. My registration page detects if a field hasn't been filled then a <meta content="3;url=?page=register\" http-equiv=\"refresh\"> tag reloads the registration page. Any idea how I can make the registration page indicate which fields were left blank without using sessions? I doubt anyone uses sessions for this kinda thing because they take so long to expire. How do they do it? Quote Link to comment https://forums.phpfreaks.com/topic/164054-how-to-add-the-asterix-beside-unfilled-fields/ Share on other sites More sharing options...
Alex Posted June 29, 2009 Share Posted June 29, 2009 Without sessions you'd have to redo the way you're currently doing it. Because the way to do it without sessions is having form verification on the same page. Quote Link to comment https://forums.phpfreaks.com/topic/164054-how-to-add-the-asterix-beside-unfilled-fields/#findComment-865426 Share on other sites More sharing options...
cunoodle2 Posted June 29, 2009 Share Posted June 29, 2009 You could have like a hidden value "step" and set it to something when the form is submitted. On the validation portion do... if ($step == 2 && $name == "") echo "*"; Quote Link to comment https://forums.phpfreaks.com/topic/164054-how-to-add-the-asterix-beside-unfilled-fields/#findComment-865427 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.