Php Experts,
Do you mind showing me how to validate the following user inputs with php ?
[code]
<form method = ‘POST’ action = “”>
<label for=’find’>Find</label>
<input type=’text’ name=’find’ id=’find’>
<br>
Table:
<input type=’radio’ name=’table’ id=’sale’><label for=’table’>Businesses On Sale</label>
<input type=’radio’ name=’table’ id=’sold’><label for=’table’>Businesses Sold</label>
<br>
<label for=’business_name’>Business Name</label>
<input type=’text’ name=’business_name’ id=’business_name’>
<label for=’business_zip’>Business Zip</label>
<input type=’text’ name=’business_zip’ id=’business_zip’>
<label for=’business_phone’>Business Phone</label>
<input type=’text’ name=’business_phone’ id=’business_phone’>
<label for=’business_mobile’>Business Mobile</label>
<input type=’text’ name=’business_mobile’ id=’business_mobile’>
<label for=’business_fax’>Business Fax</label>
<input type=’text’ name=’business_fax’ id=’business_fax’>
<label for=’business_email’>Business Email</label>
<input type=’text’ name=’business_email’ id=’business_email’>
<label for=’business_description’>Business Description</label>
<input type=’text’ name=’business_description’ id=’business_description’>
<button type=’submit’>Submit!</button>
</form>
</body>
</html>
I tried my best here:
And messed things up on my php. And so, starting all over from scratch over here now. But with your foundation this time.
I’d appreciate code samples from your ends, ofcourse. Samples that don’t use regex unless there’s no other way. Still at procedural style, mysqli and prepared statements. No pdo or oop yet. So bear this in mind when providing sample codes (if any) as I got to understand your codes. Not interested just copy & pasting lines I don’t understand. Need to learn. Proper way. Your way.
Thank you.