Posting Form Data to a Database??
| From: | Brian | Date: | Tue, 06 Aug 2002 16:14:25 +0000 |
| Subject: | Posting Form Data to a Database?? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-21014@lists.php.net to get a copy of this message | ||
Anyone have some sort of basic PHP script they might have written to help me
get a basic html form data posted as a new record into an sql database? I
am looking for something that might do the following:
Variables at top of script
SQL server:
Database :
sql username :
sql password :
Table :
And then it interprets whatever fields are submitted by an html form and
drops those fields into as a new entry into that table, so if that table has
say 4 fields, Name, Address, Phone, Email, then the form created by anyone
would need to have the exact same field names to match correctly, and when
they do, your ASP page would interpret the 4 fields and insert them as a new
record!
I think it would be very simple, and then it would be adaptable to any
situation since if I get a new table with 10 fields, as long as I make an
html page with those exact field names and modify the asp engine page to
have the new table name as a variable, then it should post correctly.