View Full Version : help me here with REQUIRED!
09-27-2005, 10:12 PM
hey, i need to make this form in php, and i need to have the following be REQUIRED!
it is a contact us form
how do i add a string REQUIRED so the user must fill in the form without it being sent?
10-01-2005, 06:20 PM
a very noobish way(my way) would be to check after having been submitted by checking $_POST("name") and seeing its empty or not. Basically going thru a series of checks on the values when submitted, maybe checkform.php or somethin, then giving error messges and having users go back and fixing the issue in the browser.
It's not a "very noobish" way at all, it's perfectly good. I suggest, though, that rather than have the user go back, you header() them back to the form page with a list of errors at the top and the previous values filled in, or even submit to the same page.
Powered by vBulletin® Version 4.2.1 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.