Jump to content

security question for contact script.


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 post
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 post
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 post
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 post
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 post
Share on other sites

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

Edited by niche
Link to post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...