<li><label for="spamc">I like this website.Enter the second word </label>
<input type="text" name="spamc" id="spamc" value="<?php if(isset($_POST['spamc'])) echo $_POST['spamc'];?>" class="required requiredField" />
<?php if($spamcerror != '') { ?>
<span class="error"><?php echo $spamcerror; ?></span>
<?php } ?>
</li>
if user enters like i want to send mail if not it should display an error. this is the validation i coded
if ($_POST['spamc'] == 'like') {
$spamc = $_POST['spamc'];
}
else{
$spamcerror = 'Please enter correct word.';
}
Its not working do you have any suggestions?