Capturing form input
am 16.06.2007 22:00:35 von Cigar2011
I will try to be short and to the point.(good Luck) I have a form
written in HTML. I have a Mysql database. I am using a linux server
and I would like to use php to write the following code:
After the user inputs their name, address, email, phone, etc. in my
html form. They will hit the submit button. I need for the
information
they entered to go into my database.
I have looked now for about 12 hours and haven't been able to find an
answer. I know I must be missing something since I've been to the w3
site, codewalkers, phpfreaks,php.net(?), and many more.
If there is an easier way of doing this I would love to hear it.
If somene could point me in the right direction I could stop banging
my head and pulling my hair.
THANK YOU in advance for your advice.
Neil
Re: Capturing form input
am 16.06.2007 23:39:59 von Shion
Cigar2011 wrote:
> I will try to be short and to the point.(good Luck) I have a form
> written in HTML. I have a Mysql database. I am using a linux server
> and I would like to use php to write the following code:
>
> After the user inputs their name, address, email, phone, etc. in my
> html form. They will hit the submit button. I need for the
> information
> they entered to go into my database.
1. you capture the values from the form with $_POST/$_GET/$_REQUEST, see
http://www.php.net/manual/en/reserved.variables.php
2. connect to the database
http://www.php.net/manual/en/function.mysql-connect.php
http://www.php.net/manual/en/function.mysql-select-db.php
3. Use sql query to insert the data to the database
http://www.php.net/manual/en/function.mysql-query.php
> I have looked now for about 12 hours and haven't been able to find an
> answer. I know I must be missing something since I've been to the w3
> site, codewalkers, phpfreaks,php.net(?), and many more.
And all you need to know was at www.php.net
--
//Aho
Re: Capturing form input
am 17.06.2007 04:21:53 von Cigar2011
Aho;
Thanks for those links. Sounds like just what I was looking for
I'm running to them right now.
>
> And all you need to know was at www.php.net
>
I suspected I was close, just couldn't put my finger on it.
Neil
On Jun 16, 5:39 pm, "J.O. Aho" wrote:
> Cigar2011 wrote:
> > I will try to be short and to the point.(good Luck) I have a form
> > written in HTML. I have a Mysql database. I am using a linux server
> > and I would like to use php to write the following code:
>
> > After the user inputs their name, address, email, phone, etc. in my
> > html form. They will hit the submit button. I need for the
> > information
> > they entered to go into my database.
>
> 1. you capture the values from the form with $_POST/$_GET/$_REQUEST, seehttp://www.php.net/manual/en/reserved.variables.php
>
> 2. connect to the databasehttp://www.php.net/manual/en/function.mysql-connect. phphttp://www.php.net/manual/en/function.mysql-select-db.php
>
> 3. Use sql query to insert the data to the databasehttp://www.php.net/manual/en/function.mysql-query.ph p
>
> > I have looked now for about 12 hours and haven't been able to find an
> > answer. I know I must be missing something since I've been to the w3
> > site, codewalkers, phpfreaks,php.net(?), and many more.
>
> And all you need to know was atwww.php.net
>
> --
>
> //Aho