I am building a contact form using this generator... http://www.webformgenerator.eu/webformgenerator.php
My simple question is how would I add a password in the php script that would deny or allow the form to go through? I am quite new with php.
I am building a contact form using this generator... http://www.webformgenerator.eu/webformgenerator.php
My simple question is how would I add a password in the php script that would deny or allow the form to go through? I am quite new with php.
$some_token = "whatever_password";
if( isset($_POST['passwordfield']) AND $_POST['passwordfield'] == $some_token)
{
$form = new ProcessForm();
$form->field_rules = array(
'field1'=>'required',
'field2'=>'required',
'field3'=>'required',
'field4'=>''
);
$form->validate();
}
else
{
echo "Invalid token!";
}