here it goes.. say if i got a form with 40 fields and i want to validate and insert them into the database... Right now the only way i know is i got to do
<form action='whatever.php' method='post'> <input type='text' name='fname'> <input type='text' name='lname'> ..... ..... <input type='submit' value='submit'> </form>
<? .... ... // do error checking, if everything is ok, insert data $sql = "INSERT INTO table_name ($fname, $lname ......) VALUES ('$_POST[fname]', '$_POST[lname]' ....)";
now 40 form fields and inserting/validating is gonna be long ..... there's gotta be a simpler way to do this. maybe get form data into an array or something validate it and then enter them into the db...
but i'm a newbie dont really know how to do it......... can anyone provide me with an snipplet (with explaination) on how i can go about doing this
thanx in advance