View Full Version : Form Action to send to Database
SDP2006
07-21-2003, 05:26 PM
Does anyone know the basic form action coding to send information from a form to fields in a database??
Thanks
mordred
07-21-2003, 06:58 PM
Sure.
Basically you look up what input was sent through the form, validate it and strip of potential malicious content, build a SQL string that contains the purified form values (and other data as needed) and send that as a SQL query to your database. Voilą! Details depend on the specific environment.
If this answer looks a little bit vague, it probably has something to do with the nature of the question. ;)
SDP2006
07-21-2003, 08:06 PM
Don't you know of any examples?????
pardicity3
07-21-2003, 09:25 PM
Never forget about the monkey:
http://hotwired.lycos.com/webmonkey/99/21/index2a.html
mordred
07-21-2003, 10:01 PM
Of course I could write some sample code. But why should I? You didn't even write to which sort of database you'd like to connect, so how should I know? I don't see the point of writing down an example for you when I haven't got the slightest idea what exactly you're asking for. Your question is *very* general. Please clarify, and you most certainly get a better answer. ;)
On the other hand, Google knows plenty of examples:
Search: "php form database example"
http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=utf-8&q=php+form+database+example&btnG=Google+Search
230.000 hits. More than enough.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.