Click to See Complete Forum and Search --> : Safety in php


Defun
February 17th, 2010, 11:57 AM
HI, I whant to use a php form (http://phpforms.net/tutorial/html-basics/php-forms.html
) on my site. Is there any way to to validate and ban data coming from insecure sources?

PeejAvery
February 17th, 2010, 04:40 PM
In the form processing, check for the HTTPS predefined variable.

if ($_SERVER['HTTPS'] == 'on') {/*...*/}