Insert Recod into MySQL Database w/o form
Moderator: General Moderators
Insert Recod into MySQL Database w/o form
I have to insert a record into a database, but I am not able to use a form. How could I do this? Thanks
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
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.
PHP also supports the cURL library to allow a script to connect directly to another website or other data source.
(#10850)
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.