Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 95904

Rajavenkateshwaran on "Spam check in contact form"

$
0
0
<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?


Viewing all articles
Browse latest Browse all 95904

Trending Articles