PHP: Prevent Spam from submit your form

Posted: February 23, 2015 in Php

Your form.html

<style>

.antiSpam
{
display: none;
}

</style>

<form action=”process.php” method=”post”>

Name : <input type=”text” value=””>

Adress : <input type=”text” value=””>

</form>

 

Your process.php

<?php

if($_POST[‘url’] <> ”)

{

echo “You’re spammer”;

exit;

}

else

{

//process your form here

}

?>

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s