alconebay Posted September 17, 2007 Share Posted September 17, 2007 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! Quote Link to comment https://forums.phpfreaks.com/topic/69673-php-form-with-captcha/ Share on other sites More sharing options...
AdRock Posted September 17, 2007 Share Posted September 17, 2007 I use a captcha image on my forms and all it does is make sure that the text that is generated by the capthca matches what the user has entered in the text box. What do you mean by handle radio buttons and check boxes? Quote Link to comment https://forums.phpfreaks.com/topic/69673-php-form-with-captcha/#findComment-350128 Share on other sites More sharing options...
alconebay Posted September 18, 2007 Author Share Posted September 18, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/69673-php-form-with-captcha/#findComment-350375 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.