I've just made a PHP/mySQL database where the user inputs ALOT of data about himself in a html-form - up to, let's say 40-50 variables. Now, the way I store this data into the mySQL-database is as follows:
INSERT INTO peopletable (name,adress,phone,fax,email,job .... and much more vars ..) VALUES ('$form_input_name','$form_input_adress','$form_input_phone' ... etc etc .. )
pheww!!! I believe there is a smarter way to do this.. can you please give me some advice?
I think of something like
INSERT INTO peopletable MY_PERSON_OBJECT) VALUES ($my_person_object_containing_all_form_input_variables)
where the my_person_object consists of $person_object.name
$person_object.adress
$person_object.phone
etc, in other words object containing the many inputs from the form...
Im sure you know about something smart to do about this..
thanks in advance,
- Per