You are here: Re: Validating HTML Controls before running PHP script. « PHP Language « IT news, forums, messages
Re: Validating HTML Controls before running PHP script.

Posted by Marcel Schindler on 10/07/14 11:35

Todd schrieb:
> Merry Christmas everyone!. I'm relatively new to PHP and I'm looking
> for way to ensure text boxes are filled and radio button are selected
> before running my PHP script. All info from the HTML controls will
> have to be passed on to the PHP script as variables. I have tried a
> few techniques such as javascript to no avail. Anyone have any
> thoughts?
>

As PHP runs on the server while the form is on the client, there is just
the solution that you use javascript to check if fields are filled
(document.form[0].element[0].value...) but that is quite insecure,
because the user can deactivate Javascript. The other solution is to
check each $_GET or $_POST-element (which you should always do) and
redirect the user back to the form (populated with those values which
were okay)

Best regards,
Marcel Schindler


--
http://www.trancefish.de/
http://www.skaletracker.de/
http://www.phpfreak.de/

 

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

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