Jump to content

security question for contact script.


vliegendetosti

Recommended Posts

Please post the script you have so far. Otherwise, it's impossible to answer your question in a way that will be useful. If you need to write a script, you've come to the right place, but you have to tell us about your capabilities.

Link to comment
Share on other sites

Niche there really is no need for his code for this simple question. Alright Tosti,The first step is going to be to just add a text input field at the end of the contact form before your submit button. The code will look similar to this.

<p>What is 2+2?</p><input type="text" name="answer" id="answer" />

Then in your php code at the top you will need to have a validate process after you verify the form has been sent. Something like this...

<?phpif(isset($_POST['submit'])){if(isset($_POST['answer']) && $_POST['answer'] == 4){#Right answer was given continue with submitting form}else{#The wrong answer was given give an error message.}}?>

That's it. Any questions just ask.Krewe

Edited by Krewe
Link to comment
Share on other sites

Posting something similar was was my first impulse, but I noticed it was only their second post. I thought it reasonable to understand whether "his" contact form is really his or someone else's. IMO, this answer has a bearing on how to help him.

Edited by niche
Link to comment
Share on other sites

Posting something similar was was my first impulse, but I noticed it was only their second post. I thought it reasonable to understand whether "his" contact form is really his or someone else's. IMO, this answer has a bearing on how to help him.
But I barely gave him any info ;) I just gave him the format and the theory of how too.If we have his code then it makes it so he does no work. I just gave him suggestions where to put it and a guideline of how to do it.If he has to have the knowledge to *SUCCESSFULLY* integrate it into his form he'll be fine and keep working. If he doesn't he'll be back... Edited by Krewe
  • Like 1
Link to comment
Share on other sites

You should use any image CAPTCHA. the reason we use these for preventing bot access. bots almost can't read image but they can read every textual content. so it will be not hard for them figuring out the correct answer.

Link to comment
Share on other sites

Agreed. As Denny Crane says, "same team!". Good answer Krewe.

Edited by niche
Link to comment
Share on other sites

I thought I answered a question like this one a day or two ago.
You did... I think the day after you answered that question this guy posted his.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...