You are here: Re: Capturing form input « PHP Programming Language « IT news, forums, messages
Re: Capturing form input

Posted by phill.luckhurst@googlemail.com on 06/16/07 22:43

On 16 Jun, 22:10, bill <nob...@spamcop.net> 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.
>
> > 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
>
> The data from the form with go to the script named in the action
> parameter of the form tag.
>
> in that script the data will be in the $_POST array.
>
> eg:
>
> <form action="contact_manage.php" method="post">
> <input type="text" name="fname" size="20" />
> <input type="text" name="lname" size="20"/>
> <input type="submit">
>
> then in the script, "contact_manage.php"
>
> $first_name = $_POST['fname'];
> $last_name = $_POST['lname'];
>
> But, don't even think about putting user supplied data directly
> into the database. Bad things can happen.
>
> http://us2.php.net/manual/en/security.database.sql-injection.php
>
> bill- Hide quoted text -
>
> - Show quoted text -

I came accross this little script today that should save a lot of the
effort. It creates the form for you and submits the data to your
database.

href=http://phpformgen.sourceforge.net

got to sort the security bit though

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация