Re: questions regarding PHP and Forms

From: Date: Fri, 27 Jan 2006 19:34:39 +0000
Subject: Re: questions regarding PHP and Forms
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-229377@lists.php.net to get a copy of this message
On Fri, 27 Jan 2006 12:28:07 -0700 Paul Goepfert <paul.goepfert@gmail.com> wrote: > > I am writing my first website in php. I have a few questions. > > 1) I need to do vaildation on form values that I have entered into a > form. Is there a way I can write the vaildation code on the same page > as the form in php? Yes. What you do is check to see if you have any input, if not then display the form, if you do then validate the input and skip the display. > 2) I have a drop down menu on one of my form fields. What I want to > do is if a certain item is seelected I want to have a new textbox > appear below the drop down menu. Is there a way to do this in php? It depends. If you want the text box to appear immediately then no, you'll need JavaScript. If you're ok with the user hitting submit and being re-desplayed the same page, this time with the text box showing, then that is trivial in php. You can use the same process as the validation in (1) above. Regards, Ozz.

Attachment: [application/pgp-signature]
« previous php.general (#229377) next »