I have added a checker to ensure that all fields in a form have data within when the form is submitted.
if( ( isset($_POST['name'] == "Contact") )
&& ( isset($_POST['company'] == "Company Name") )
&& ( isset($_POST['address'] == "Address") )
&& ( isset($_POST['turnover'] == "Approx. Turnover") )
&& ( isset($_POST['employees'] == "No. Of Employees") )
&& ( isset($_POST['contact'] == "Contact Number") )
)
{
//nothing has changed and we fail the form
$_SESSION['failed'] == true;
}
else{
I am getting the following error:
Parse error: syntax error, unexpected T_IS_EQUAL, expecting ',' or ')'
Can anyone see what the problem is? Also, will this check that all post values have data within?
Thanks.