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
https://forums.phpfreaks.com/topic/69673-php-form-with-captcha/
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
https://forums.phpfreaks.com/topic/69673-php-form-with-captcha/#findComment-350375
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.