Welcome to WebmasterWorld Guest from 184.108.40.206
I am used to ASP and SQL Server, and typically, I use a request.form(fieldname) to get the form contents, then I will insert it into my SQL statement...
But how on earth do you get form values in PHP to be put into a mySQL database.
It would be ideal if there were a script out there, written in PHP that collects all the form data and puts it into a nice SQL string for insertion... Assuming of course that the field names in the form are the same as the column names in the table.
Any chance I'd get lucky on this one?
Thanks if so~
Say you had form fields called 'foo', 'bar' and 'baz' that you wanted to insert into a table 'widgets' with columns 'one', 'two' and 'three', your PHP would look something like:
$query="INSERT INTO widgets (one, two, three) VALUES ('$foo', '$bar', '$baz')";
Hope this helps