Re: questions regarding PHP and Forms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 27 Jan 2006 12:28:07 -0700
Paul Goepfert <paul.goepfert@xxxxxxxxx> 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: pgppDkadSCeo4.pgp
Description: PGP signature


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux