Page 1 of 1

Insert Recod into MySQL Database w/o form

Posted: Sat Jun 24, 2006 10:52 pm
by Clukey
I have to insert a record into a database, but I am not able to use a form. How could I do this? Thanks

Posted: Sat Jun 24, 2006 11:05 pm
by Christopher
Inserting the data into a database is independent of where the data comes from. It is generally recommended that data submitted by a use comes from a post request, but you could get the parameters from a URL get request or from a data feed like RSS or any other source.

PHP also supports the cURL library to allow a script to connect directly to another website or other data source.

Posted: Sat Jun 24, 2006 11:40 pm
by Clukey
I've just got about 5 variables and I want them to be inserted into a database immidiately when the page it executedn I don't have to request the variables from anywhere since they are POSTed to the page, and I know how to access those, but I can't seen to find the right code to get it into the database. I've tried mysql_query but it hasn't worked, although I might have formatted it wrong. Got any sugestions? Thanks.