You are here: Re: form and submit key « PHP Programming Language « IT news, forums, messages
Re: form and submit key

Posted by Martie on 07/07/06 20:56

On 7 Jul 2006 02:00:47 -0700, Sonnich wrote...
>
>Hi
>
>one thing more.
>
>Say, I have a <form> with a text input and a submit button - how do I
>then get the data when reloading or how?
>
>Sorry, this is probably simple... but to me it is new.
>
>BR
>Sonnich
>


Depending if your form uses the "get" or "post" method, the values of the
submitted form would be stored in either $_GET['field1'] or $_POST['field1'].
The trick is the data is store when the form is submitted. If you are reloading
a page though, it will load it's original state, so if you are starting with a
blank form, you'll get a blank form.

If you are submitting the form and doing your basic security and form
validation, you can use the $_GET or $_POST variables as the values for your
form fields. Something like this maybe...

<input type="text" name="field1" value="<%=$_POST['field1']%>">



Martie
--
Newsguy Express $9.95 monthly
http://newsguy.com/overview.htm

 

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

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