Jump to content

PHP Form with Captcha


alconebay

Recommended Posts

I am working on putting a captcha in my web site's form. I am using the in form captcha from http://www.captcha.biz/captcha-modifications/how-to-modify-captcha.html

It works great for text boxes and text areas but I cant figure out how to get it to handle radio boxes and check boxes. The PHP for a text box looks like this:

 

<label for="name">Name*:</label>

<input name="name" type="text" id="name" size="70" value="<?php if(isset($_POST['name'])){echo $_POST['name'];} ?>" />

 

and the result is emailed to me like this:

 

Your Name: '. $_name . '<br>

 

Anyone know what the PHP for "Yes"/"No" radio boxes would look like? Thanks for the help!

Link to comment
Share on other sites

I worded that bad. I had to change the form up so it would work with the captcha (page went from html to php) It looks like I have to add those php values to each object in the form (value="<?php if(isset($_POST['name'])){echo $_POST['name'];} ?>" />) for the object to be emailed to me. The value above is for a text box. I tried to add a radio box to the form the same way but it was emailed back to me blank.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.