PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I've been trying to make my contact form engine mandatory for the name, phone number and email fields, but when I upload it on the ftp and test it, I keep getting errors. Here's the code I have that is working without the fields being mandatory:
I would like it to return something that says: "Enter Your Name/Phone Number/Email" corresponding to the appropriate field they didn't fill out. Thanks for any input you can provide!
Last edited by Benjamin on Thu Jan 06, 2011 6:13 pm, edited 1 time in total.
Reason:Added [syntax=php] tags.
Or something very close to that. You can reverse the logic and use != in the if statement then execute some other code there and then an else statement returns false.