Re: Store form entries to DB
Posted by:
Kai Voigt
Date: July 07, 2005 04:18PM
Hello,
you have programmed some PHP script as the action of your HTML form. In this script, you can access the form variables by the $_GET or $_POST arrays, whatever you specified as the method for the form.
Then you can build your SQL query as an PHP string like this:
$my_query = sprintf("insert into my_table (username, email) values ('%s', '%s')", $_GET("username"), $_GET("email"));
This query can be used against your MySQL server. If you need to know how to talk to your MySQL server from PHP, read
http://us2.php.net/en/mysql for example code.
Kai
Subject
Written By
Posted
Re: Store form entries to DB
July 07, 2005 04:18PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.