justspiffy Posted December 11, 2009 Share Posted December 11, 2009 Does anyone know how to make CAPTCHA work in a php_self file? I have made a form, and when you click submit the results load on the same page. That seems to be a problem when implementing CAPTCHA. I don't know much about PHP but this is what I gather from the errors I am getting and what I have read about it. I really only know how to make a form by using php_self, so if someone can guide me on how to make my form by placing the results on another php page I could go that route. I would much rather than having to redo the form (which took me forever ) to have it work on the self page, but im not to sure that is an option. Here is the code from my form, which works great thanks to some help from this forum: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <?php require_once('recaptchalib.php'); $privatekey = "6LeJ7AkAAAAAAFMnumFTLFhPwdtVGmwT7jGRq5O0"; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." . "(reCAPTCHA said: " . $resp->error . ")"); } ?> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Cat & Dog Tag Renewal Form</title> <script type= "text/javascript"> var RecaptchaOptions = { theme: 'clean' }; </script> <script language="javascript" type="text/javascript"> //<![CDATA[ var tl_loc0=(window.location.protocol == "https:")? "https://secure.comodo.net/trustlogo/javascript/trustlogo.js" : "http://www.trustlogo.com/trustlogo/javascript/trustlogo.js"; document.writeln('<scr' + 'ipt language="JavaScript" src="'+tl_loc0+'" type="text\/javascript">' + '<\/scr' + 'ipt>'); //]]> </script> </head> <body topmargin ="0" leftmargin="0" marginwidth="0" marginheight="0" onLoad="createExpiry();"> <p><img border="0" src="images/header.jpg" width="675" height="119"></p> <table border="0" width="800" cellspacing="0" cellpadding="0"> <tr> <td width="3%"></td> <td width="97%"> <?php if ($_SERVER['REQUEST_METHOD'] != 'POST'){ $me = $_SERVER['PHP_SELF']; ?> <form name="form1" method="post" action="<?php echo $me;?>"> <table border="0" width="483" height="48" cellspacing="0" cellpadding="0"> <tr> <td width="114" height="19" valign="middle">Please Enter ID #:</td> <td width="160" height="19" align="center" valign="middle"> <input type="text" name="ID_Number" size="22" tabindex="1" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> <td width="203" height="19" align="center"> (found above surname on your invoice)</td> </tr> <tr> <td width="114" height="19"></td> <td width="160" height="19" align="center"></td> <td width="203" height="19" align="center"></td> </tr> <tr> <td width="114" height="19" valign="bottom">Name:</td> <td width="160" height="19" align="center"> <input type="text" name="Surname" size="22" tabindex="2" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> <td width="203" height="19" align="center" valign="bottom"> <input type="text" name="Given_Name" size="25" tabindex="3" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr> <td width="114" height="17"></td> <td width="160" height="17" align="center">(Surname)</td> <td width="203" height="17" align="center">(Given)</td> </tr> <tr> <td width="114" height="17">E-Mail Address:</td> <td width="363" height="17" align="center" colspan="2"> <p align="left"> <input type="text" name="Email_Address" size="42" tabindex="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr height=5> <td align="center" colspan="3"> </td> </tr> <tr> <td align=center colspan=3> <font size=2>*a confirmation number will be emailed to the above addess upon submission</font> </td> </tr> <tr height=15> <td align="center" colspan="3"> </td> </tr> </table> <table width="485" height="50" cellspacing="0" cellpadding="2" style="border-width:1px;border-color:#ff0000;border-style:solid"> <tr> <td colspan="2" width="485" height="19">Have you had a change in address or phone number over the last year?</td> </tr> <tr> <td><input type="radio" value="change_yes" name="Contact_Change" tabindex="5">Yes</td> </tr> <tr> <td><input type="radio" value="change_no" name="Contact_Change" tabindex="6">No</td> </tr> </table> <br/> <table border="0" width="485" height="100" cellspacing="0" cellpadding="0"> <tr> <td width="305" height="19">Address:</td> <td width="390" height="19" align="left"> <input type="text" name="Address" size="51" tabindex="7" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr> <td width="305" height="17"></td> <td width="390" height="17" align="left">Apt# Street# Street</td> </tr> <tr> <td width="305" height="15"></td> <td width="390" height="15" align="center"></td> </tr> <tr> <td width="305" height="17">Municipality:</td> <td width="390" height="17" align="left"> <input type="text" name="Municipality" size="22" value="London" tabindex="8" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr> <td width="305" height="17">Province:</td> <td width="390" height="17" align="left"> <input type="text" name="Province" size="22" tabindex="9" value="ON" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr> <td width="305" height="17">Postal Code:</td> <td width="390" height="17" align="left"> <input type="text" name="Postal_Code" size="22" tabindex="10" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr> <td width="305" height="17"></td> <td width="390" height="17" align="left"></td> </tr> <tr> <td width="305" height="17" rowspan="2">Phone #<br/>(with area code):</td> <td width="390" height="17" align="left">Home: <input type="text" name="Phone_Home" size="12" tabindex="11" maxlength="12" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> (eg. 519-555-5555)</td> </tr> <tr> <td width="390" height="17" align="left">Work: <input type="text" name="Phone_Work" size="12" tabindex="12" maxlength="12" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> ext: <input type="text" name="Phone_Work_Extension" size="8" tabindex="13" maxlength="8" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> </table> <p> </p> <table border="0" width="538" cellspacing="0" cellpadding="0"> <tr> <td width="130"><b>Billing Information</b></td> <td width="234"></td> </tr> <tr> <td width="130" rowspan="2"> <!-- Authentic Trust Logo Seal verification code START --> <!-- TrustLogo Html Builder Code: Shows the logo at URL http://www.accpets.ca/images/trust_logo.GIF Logo type is ("SC4") Not Floating //--> <a href="http://www.instantssl.com" id="comodoTL">SSL</a> <script type="text/javascript">TrustLogo("http://www.accpets.ca/images/trust_logo.GIF", "SC4", "none");</script> <!-- Authentic Trust Logo Seal verification code END --> </td> <td width="234"><input type="radio" value="MasterCard" name="Card_Type" tabindex="14" checked>MasterCard</td> </tr> <tr> <td width="234"><input type="radio" value="Visa" name="Card_Type" tabindex="15">Visa</td> </tr> <tr> <td width="130"></td> <td width="234"></td> </tr> <tr> <td width="130">Name of Cardholder:</td> <td width="234"><input type="text" name="CreditCardName" size="45" tabindex="16" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr> <td width="130">Card #: </td> <td width="300"> <input type="text" name="CardNumber" size="4" tabindex="17" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <input type="text" name="CardNumber1" size="4" tabindex="18" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <input type="text" name="CardNumber2" size="4" tabindex="19" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <input type="text" name="CardNumber3" size="4" tabindex="20" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr> <td width="130">Expiry Date: </td> <td width="234"> <select size="1" name="Expiry_Month" tabindex="21" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <option>MM</option> <option>01</option> <option>02</option> <option>03</option> <option>04</option> <option>05</option> <option>06</option> <option>07</option> <option>08</option> <option>09</option> <option>10</option> <option>11</option> <option>12</option> </select> <select size="1" name="Expiry_Year" tabindex="22" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <option>YYYY</option> <option>2009</option> <option>2010</option> <option>2011</option> <option>2012</option> <option>2013</option> <option>2014</option> <option>2015</option> <option>2016</option> <option>2017</option> <option>2018</option> </select></td> </tr> </table> <p>Please indicate amount to be paid: $ <input type="text" name="Amount_Paid" size="13" tabindex="23" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></p> <p> </p> <table border="0" width="539" cellspacing="0" cellpadding="0" height="69"> <tr> <td width="262" height="21"><b>Rabies Information</b></td> <td width="261" height="21"></td> </tr> <tr> <td width="262" height="25">Veterinarian Clinic Name</td> <td width="261" height="25" valign="middle"> <input type="text" name="vet_clinic_name" size="20" tabindex="24" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <br> <br> </td> </tr> <tr> <td width="262" height="23">Name of First Animal</td> <td width="261" height="23"> <input type="text" name="Animal1_Name" size="20" tabindex="25" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr> <td width="262" height="23">Month and Year of Vaccination</td> <td width="261" height="23"> <select size="1" name="Rabies_Month_Animal1" tabindex="26" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <option>MM</option> <option value="January">January</option> <option value="February">February</option> <option value="March">March</option> <option value="April">April</option> <option value="May">May</option> <option value="June">June</option> <option value="July">July</option> <option value="August">August</option> <option value="September">September</option> <option value="October">October</option> <option value="November">November</option> <option value="December">December</option> </select> <select size="1" name="Rabies_Year_Animal1" tabindex="27" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <option>YYYY</option> <option>2002</option> <option>2003</option> <option>2004</option> <option>2005</option> <option>2006</option> <option>2007</option> <option>2008</option> <option>2009</option> <option>2010</option> <option>2011</option> </select> <br> <br> </td> </tr> <tr> <td width="262" height="23">Name of Second Animal</td> <td width="261" height="23"> <input type="text" name="Animal2_Name" size="20" tabindex="28" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr> <td width="262" height="23">Month and Year of Vaccination</td> <td width="261" height="23"> <select size="1" name="Rabies_Month_Animal2" tabindex="29" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <option>MM</option> <option value="January">January</option> <option value="February">February</option> <option value="March">March</option> <option value="April">April</option> <option value="May">May</option> <option value="June">June</option> <option value="July">July</option> <option value="August">August</option> <option value="September">September</option> <option value="October">October</option> <option value="November">November</option> <option value="December">December</option> </select> <select size="1" name="Rabies_Year_Animal2" tabindex="30" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <option>YYYY</option> <option>2002</option> <option>2003</option> <option>2004</option> <option>2005</option> <option>2006</option> <option>2007</option> <option>2008</option> <option>2009</option> <option>2010</option> <option>2011</option> </select> <br> <br> </td> </tr> <tr> <td width="262" height="23">Name of Third Animal</td> <td width="261" height="23"> <input type="text" name="Animal3_Name" size="20" tabindex="31" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr> <td width="262" height="23">Month and Year of Vaccination</td> <td width="261" height="23"> <select size="1" name="Rabies_Month_Animal3" tabindex="32" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <option>MM</option> <option value="January">January</option> <option value="February">February</option> <option value="March">March</option> <option value="April">April</option> <option value="May">May</option> <option value="June">June</option> <option value="July">July</option> <option value="August">August</option> <option value="September">September</option> <option value="October">October</option> <option value="November">November</option> <option value="December">December</option> </select> <select size="1" name="Rabies_Year_Animal3" tabindex="33" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <option>YYYY</option> <option>2002</option> <option>2003</option> <option>2004</option> <option>2005</option> <option>2006</option> <option>2007</option> <option>2008</option> <option>2009</option> <option>2010</option> <option>2011</option> </select></td> </tr> </table> <table> <tr height="15"> <td></td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="600"> <tr> <td><strong>Breed Certification</strong><br /><i>(if only renewing cat identification tags, please select the Cat renewal only box)</i> </td> </tr> <tr height="10"> <td> </td> </tr> <tr> <td><input type="radio" name="DogOrCat" value="No Pit Bull - Declared" />I am the Owner of the above indicated dog(s) and the dog(s) is/are not Pit Bull dog(s)<br /> as defined in the City of London's Pit Bull dog licensing by-law. </td> </tr> <tr> <td><input type="radio" name="DogOrCat" value="Cat renewal only" />Cat renewal only</td> </tr> </table> <p> </p> <p>Notes: If amount to be paid does not match amount invoiced, please explain in the box provided.<b>*</b></p> <p> <textarea rows="4" name="Notes" cols="72" tabindex="34" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></textarea></p> <p><b>*If spay/neuter has occurred in past year, please provide veterinary name and phone number for follow up.</b></p> <p align="center"><br /> <?php require_once('recaptchalib.php'); $publickey = "6LeJ7AkAAAAAABZ31i0q_xl97A9s53eGgcEonG80"; // you got this from the signup page echo recaptcha_get_html($publickey); ?> <br /> <input type="submit" value="Submit" name="B1"> <input type="reset" value="Reset" name="B2"> </p> </form> </table> <?php } else { error_reporting(0); $recipient = '[email protected]'; $ID_Number = stripslashes($_POST['ID_Number']); $Surname = stripslashes($_POST['Surname']); $Given_name = stripslashes($_POST['Given_name']); $Email_Address = stripslashes($_POST['Email_Address']); $Contact_Change = stripslashes($_POST['Contact_Change']); $Address = stripslashes($_POST['Address']); $Municipality = stripslashes($_POST['Municipality']); $Province = stripslashes($_POST['Province']); $Postal_Code = stripslashes($_POST['Postal_Code']); $Phone_Home = stripslashes($_POST['Phone_Home']); $Phone_Work = stripslashes($_POST['Phone_Work']); $Phone_Work_Extension = stripslashes($_POST['Phone_Work_Extension']); $Card_Type = stripslashes($_POST['Card_Type']); $CreditCardName = stripslashes($_POST['CreditCardName']); $CardNumber = stripslashes($_POST['CardNumber']); $CardNumber1 = stripslashes($_POST['CardNumber1']); $CardNumber2 = stripslashes($_POST['CardNumber2']); $CardNumber3 = stripslashes($_POST['CardNumber3']); $Expiry_Month = stripslashes($_POST['Expiry_Month']); $Expiry_Year = stripslashes($_POST['Expiry_Year']); $Amount_Paid = stripslashes($_POST['Amount_Paid']); $vet_clinic_name = stripslashes($_POST['vet_clinic_name']); $Animal1_Name = stripslashes($_POST['Animal1_Name']); $Rabies_Month_Animal1 = stripslashes($_POST['Rabies_Month_Animal1']); $Rabies_Year_Animal1 = stripslashes($_POST['Rabies_Year_Animal1']); $Animal2_Name = stripslashes($_POST['Animal2_Name']); $Rabies_Month_Animal2 = stripslashes($_POST['Rabies_Month_Animal2']); $Rabies_Year_Animal2 = stripslashes($_POST['Rabies_Year_Animal2']); $Animal3_Name = stripslashes($_POST['Animal3_Name']); $Rabies_Month_Animal3 = stripslashes($_POST['Rabies_Month_Animal3']); $Rabies_Year_Animal3 = stripslashes($_POST['Rabies_Year_Animal3']); $DogOrCat = stripslashes($_POST['DogOrCat']); $Notes = stripslashes($_POST['Notes']); $sendto = $_POST['Email_Address']; $headers = "From: $recipient\r\n\r\n"; $subject = "Dog & Cat Tag Renewal"; $message = "Thank you for registering your pet with London Animal Care Centre.\n Please keep this email as proof of your application for your dog licence or cat identification tag.<br /> Your confirmation Id is \n If you have any questions or concerns please call (519)685-1330 and have your confirmation id available.\n Please allow 3 to 6 weeks for processing and delivery of your tags.\n ID #: $ID_Number\r\n Name: $Surname $Given_name\r\n E-Mail Address: $Email_Address\r\n Have you had a change in address or phone number over the last year?: $Contact_Change\r\n Address: $Address\r\n Municipality: $Municipality\r\n Province: $Province\r\n Postal Code: $Postal_Code\r\n Phone # - Home: $Phone_Home\r\n Phone # - Work: $Phone_Work\r\n Work Ext: $Phone_Work_Extension\r\n Card Type: $Card_Type\r\n Name of Cardholder: $CreditCardName\r\n Card #: XXXX-XXXX-XXXX-$CardNumber3\r\n Expiry Date: $Expiry_Month $Expiry_Year\r\n Please indicate amount to be paid: $Amount_Paid\r\n Veterinarian Clinic Name: $vet_clinic_name\r\n Name of First Animal: $Animal1_Name\r\n Month and Year of Vaccination: $Rabies_Month_Animal1 $Rabies_Year_Animal1\r\n Name of Second Animal: $Animal2_Name\r\n Month and Year of Vaccination: $Rabies_Month_Animal2 $Rabies_Year_Animal2\r\n Name of Third Animal: $Animal3_Name\r\n Month and Year of Vaccination: $Rabies_Month_Animal3 $Rabies_Year_Animal3\r\n Breed Certification: $DogOrCat\r\n Notes: $Notes\r\n "; // Send mail to customer, refer to http://php.net/manual/en/function.mail.php mail($sendto, $subject, $message, $headers); if (!mail) { echo "Message failed to send, please notify our Web Team."; } else { echo nl2br ("<center><br><br><br><br><br><br><br><br><br><br>Thank you. Your request has been sent and we will contact you shortly.<br><br><br><br><br><br><br><br><br><br></center>"); } // Send mail to company $to = "[email protected]"; // who gets this one? $message = "Thank you for registering your pet with London Animal Care Centre.\n Please keep this email as proof of your application for your dog licence or cat identification tag.<br /> Your confirmation Id is \n If you have any questions or concerns please call (519)685-1330 and have your confirmation id available.\n Please allow 3 to 6 weeks for processing and delivery of your tags.\n ID #: $ID_Number\r\n Name: $Surname $Given_name\r\n E-Mail Address: $Email_Address\r\n Have you had a change in address or phone number over the last year?: $Contact_Change\r\n Address: $Address\r\n Municipality: $Municipality\r\n Province: $Province\r\n Postal Code: $Postal_Code\r\n Phone # - Home: $Phone_Home\r\n Phone # - Work: $Phone_Work\r\n Work Ext: $Phone_Work_Extension\r\n Card Type: $Card_Type\r\n Name of Cardholder: $CreditCardName\r\n Card #: $CardNumber $CardNumber1 $CardNumber2 $CardNumber3\r\n Expiry Date: $Expiry_Month $Expiry_Year\r\n Please indicate amount to be paid: $Amount_Paid\r\n Veterinarian Clinic Name: $vet_clinic_name\r\n Name of First Animal: $Animal1_Name\r\n Month and Year of Vaccination: $Rabies_Month_Animal1 $Rabies_Year_Animal1\r\n Name of Second Animal: $Animal2_Name\r\n Month and Year of Vaccination: $Rabies_Month_Animal2 $Rabies_Year_Animal2\r\n Name of Third Animal: $Animal3_Name\r\n Month and Year of Vaccination: $Rabies_Month_Animal3 $Rabies_Year_Animal3\r\n Breed Certification: $DogOrCat\r\n Notes: $Notes\r\n "; mail($to, $subject, $message, $headers); if (!mail) { echo "Message failed to send. Please notify our Web Team."; } else { // something here to notify the web team if it fails. } } ?> <p> <!-- Seal verification code START --> <!-- Seal verification code END --></p> </body> </html> and here is the code that i need to make CAPTCHA to work. this code is suppose to go in the <head> which is what i have done on the file <?php require_once('recaptchalib.php'); $privatekey = "6LeJ7AkAAAAAAFMnumFTLFhPwdtVGmwT7jGRq5O0"; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." . "(reCAPTCHA said: " . $resp->error . ")"); } ?> and this code is suppose to go where i want the CAPTCHA to be, which I have put above the submit button <?php require_once('recaptchalib.php'); $publickey = "6LeJ7AkAAAAAABZ31i0q_xl97A9s53eGgcEonG80"; // you got this from the signup page echo recaptcha_get_html($publickey); ?> any help would be great. thanks guys! Quote Link to comment https://forums.phpfreaks.com/topic/184792-captcha-in-php_self/ Share on other sites More sharing options...
teamatomic Posted December 11, 2009 Share Posted December 11, 2009 page1.php <form action="page2.php method="post"> <input name="id" type="text" value=""> <form> page2.php $id = $_POST['id']; echo "$id"; HTH Teamatomic Quote Link to comment https://forums.phpfreaks.com/topic/184792-captcha-in-php_self/#findComment-975647 Share on other sites More sharing options...
justspiffy Posted December 14, 2009 Author Share Posted December 14, 2009 thank you for your reply. I tried doing what you said but it doesnt look like it is working. When i hit "submit" i get a page cannot be displayed. It shows the info from the form in the subject line, which i doubt is safe when they are inputting their credit card information. here is my code - renewal.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Cat & Dog Tag Renewal Form</title> <script language="javascript" type="text/javascript"> <!-- //<![CDATA[ var tl_loc0=(window.location.protocol == "https:")? "https://secure.comodo.net/trustlogo/javascript/trustlogo.js" : "http://www.trustlogo.com/trustlogo/javascript/trustlogo.js"; document.writeln('<scr' + 'ipt language="JavaScript" src="'+tl_loc0+'" type="text\/javascript">' + '<\/scr' + 'ipt>'); //]]> function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_validateForm() { //v4.0 var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments; for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]); if (val) { nm=val.name; if ((val=val.value)!="") { if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n'; } else if (test!='R') { num = parseFloat(val); if (isNaN(val)) errors+='- '+nm+' must contain a number.\n'; if (test.indexOf('inRange') != -1) { p=test.indexOf(':'); min=test.substring(8,p); max=test.substring(p+1); if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n'; } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; } } if (errors) alert('The following error(s) occurred:\n'+errors); document.MM_returnValue = (errors == ''); } //--> </script> </head> <body topmargin ="0" leftmargin="0" marginwidth="0" marginheight="0" onLoad="createExpiry();"> <p><img border="0" src="images/header.jpg" width="675" height="119"></p> <table border="0" width="800" cellspacing="0" cellpadding="0"> <tr> <td width="3%"></td> <td width="97%"> <form action="page2.php method="post"> <table border="0" width="483" height="48" cellspacing="0" cellpadding="0"> <tr> <td width="114" height="19" valign="middle">Please Enter ID #:</td> <td width="160" height="19" align="center" valign="middle"> <input type="text" name="ID_Number" size="22" tabindex="1" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> <td width="203" height="19" align="center"> (found above surname on your invoice)</td> </tr> <tr> <td width="114" height="19"></td> <td width="160" height="19" align="center"></td> <td width="203" height="19" align="center"></td> </tr> <tr> <td width="114" height="19" valign="bottom">Name:</td> <td width="160" height="19" align="center"> <input type="text" name="Surname" size="22" tabindex="2" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> <td width="203" height="19" align="center" valign="bottom"> <input type="text" name="Given_name" size="25" tabindex="3" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr> <td width="114" height="17"></td> <td width="160" height="17" align="center">(Surname)</td> <td width="203" height="17" align="center">(Given)</td> </tr> <tr> <td width="114" height="17">E-Mail Address:</td> <td width="363" height="17" align="center" colspan="2"> <p align="left"> <input type="text" name="Email_Address" size="42" tabindex="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr height=5> <td align="center" colspan="3"> </td> </tr> <tr> <td align=center colspan=3> <font size=2>*a confirmation number will be emailed to the above addess upon submission</font> </td> </tr> <tr height=15> <td align="center" colspan="3"> </td> </tr> </table> <table width="485" height="50" cellspacing="0" cellpadding="2" style="border-width:1px;border-color:#ff0000;border-style:solid"> <tr> <td colspan="2" width="485" height="19">Have you had a change in address or phone number over the last year?</td> </tr> <tr> <td><input type="radio" value="change_yes" name="Contact_Change" tabindex="5">Yes</td> </tr> <tr> <td><input type="radio" value="change_no" name="Contact_Change" tabindex="6">No</td> </tr> </table> <br/> <table border="0" width="485" height="100" cellspacing="0" cellpadding="0"> <tr> <td width="305" height="19">Address:</td> <td width="390" height="19" align="left"> <input type="text" name="Address" size="51" tabindex="7" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr> <td width="305" height="17"></td> <td width="390" height="17" align="left">Apt# Street# Street</td> </tr> <tr> <td width="305" height="15"></td> <td width="390" height="15" align="center"></td> </tr> <tr> <td width="305" height="17">Municipality:</td> <td width="390" height="17" align="left"> <input type="text" name="Municipality" size="22" value="London" tabindex="8" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr> <td width="305" height="17">Province:</td> <td width="390" height="17" align="left"> <input type="text" name="Province" size="22" tabindex="9" value="ON" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr> <td width="305" height="17">Postal Code:</td> <td width="390" height="17" align="left"> <input type="text" name="Postal_Code" size="22" tabindex="10" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr> <td width="305" height="17"></td> <td width="390" height="17" align="left"></td> </tr> <tr> <td width="305" height="17" rowspan="2">Phone #<br/>(with area code):</td> <td width="390" height="17" align="left">Home: <input type="text" name="Phone_Home" size="12" tabindex="11" maxlength="12" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> (eg. 519-555-5555)</td> </tr> <tr> <td width="390" height="17" align="left">Work: <input type="text" name="Phone_Work" size="12" tabindex="12" maxlength="12" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> ext: <input type="text" name="Phone_Work_Extension" size="8" tabindex="13" maxlength="8" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> </table> <p> </p> <table border="0" width="538" cellspacing="0" cellpadding="0"> <tr> <td width="130"><b>Billing Information</b></td> <td width="234"></td> </tr> <tr> <td width="130" rowspan="2"> <!-- Authentic Trust Logo Seal verification code START --> <!-- TrustLogo Html Builder Code: Shows the logo at URL http://www.accpets.ca/images/trust_logo.GIF Logo type is ("SC4") Not Floating //--> <a href="http://www.instantssl.com" id="comodoTL">SSL</a> <script type="text/javascript">TrustLogo("http://www.accpets.ca/images/trust_logo.GIF", "SC4", "none");</script> <!-- Authentic Trust Logo Seal verification code END --> </td> <td width="234"><input type="radio" value="MasterCard" name="Card_Type" tabindex="14" checked>MasterCard</td> </tr> <tr> <td width="234"><input type="radio" value="Visa" name="Card_Type" tabindex="15">Visa</td> </tr> <tr> <td width="130"></td> <td width="234"></td> </tr> <tr> <td width="130">Name of Cardholder:</td> <td width="234"><input type="text" name="CreditCardName" size="45" tabindex="16" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr> <td width="130">Card #: </td> <td width="300"> <input type="text" name="CardNumber" size="4" tabindex="17" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <input type="text" name="CardNumber1" size="4" tabindex="18" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <input type="text" name="CardNumber2" size="4" tabindex="19" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <input type="text" name="CardNumber3" size="4" tabindex="20" maxlength="4" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr> <td width="130">Expiry Date: </td> <td width="234"> <input name="Expiry_Month" type="text" id="Expiry_Month" size="2" maxlength="2" /> <input name="Expiry_Year" type="text" id="Expiry_Year" size="2" maxlength="2" /> </label></td> </tr> </table> <p>Please indicate amount to be paid: $ <input type="text" name="Amount_Paid" size="13" tabindex="23" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></p> <p> </p> <table border="0" width="539" cellspacing="0" cellpadding="0" height="69"> <tr> <td width="262" height="21"><b>Rabies Information</b></td> <td width="261" height="21"></td> </tr> <tr> <td width="262" height="25">Veterinarian Clinic Name</td> <td width="261" height="25" valign="middle"> <input type="text" name="vet_clinic_name" size="20" tabindex="24" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <br> <br> </td> </tr> <tr> <td width="262" height="23">Name of First Animal</td> <td width="261" height="23"> <input type="text" name="Animal1_Name" size="20" tabindex="25" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr> <td width="262" height="23">Month and Year of Vaccination</td> <td width="261" height="23"> <select size="1" name="Rabies_Month_Animal1" tabindex="26" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <option selected="selected">MM</option> <option value="January">January</option> <option value="February">February</option> <option value="March">March</option> <option value="April">April</option> <option value="May">May</option> <option value="June">June</option> <option value="July">July</option> <option value="August">August</option> <option value="September">September</option> <option value="October">October</option> <option value="November">November</option> <option value="December">December</option> </select> <select size="1" name="Rabies_Year_Animal1" tabindex="27" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <option>YYYY</option> <option>2002</option> <option>2003</option> <option>2004</option> <option>2005</option> <option>2006</option> <option>2007</option> <option>2008</option> <option>2009</option> <option>2010</option> <option>2011</option> </select> <br> <br> </td> </tr> <tr> <td width="262" height="23">Name of Second Animal</td> <td width="261" height="23"> <input type="text" name="Animal2_Name" size="20" tabindex="28" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr> <td width="262" height="23">Month and Year of Vaccination</td> <td width="261" height="23"> <select size="1" name="Rabies_Month_Animal2" tabindex="29" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <option selected="selected">MM</option> <option value="January">January</option> <option value="February">February</option> <option value="March">March</option> <option value="April">April</option> <option value="May">May</option> <option value="June">June</option> <option value="July">July</option> <option value="August">August</option> <option value="September">September</option> <option value="October">October</option> <option value="November">November</option> <option value="December">December</option> </select> <select size="1" name="Rabies_Year_Animal2" tabindex="30" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <option>YYYY</option> <option>2002</option> <option>2003</option> <option>2004</option> <option>2005</option> <option>2006</option> <option>2007</option> <option>2008</option> <option>2009</option> <option>2010</option> <option>2011</option> </select> <br> <br> </td> </tr> <tr> <td width="262" height="23">Name of Third Animal</td> <td width="261" height="23"> <input type="text" name="Animal3_Name" size="20" tabindex="31" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></td> </tr> <tr> <td width="262" height="23">Month and Year of Vaccination</td> <td width="261" height="23"> <select size="1" name="Rabies_Month_Animal3" tabindex="32" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <option selected="selected">MM</option> <option value="January">January</option> <option value="February">February</option> <option value="March">March</option> <option value="April">April</option> <option value="May">May</option> <option value="June">June</option> <option value="July">July</option> <option value="August">August</option> <option value="September">September</option> <option value="October">October</option> <option value="November">November</option> <option value="December">December</option> </select> <select size="1" name="Rabies_Year_Animal3" tabindex="33" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"> <option>YYYY</option> <option>2002</option> <option>2003</option> <option>2004</option> <option>2005</option> <option>2006</option> <option>2007</option> <option>2008</option> <option>2009</option> <option>2010</option> <option>2011</option> </select></td> </tr> </table> <table> <tr height="15"> <td></td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="600"> <tr> <td><strong>Breed Certification</strong><br /><i>(if only renewing cat identification tags, please select the Cat renewal only box)</i> </td> </tr> <tr height="10"> <td> </td> </tr> <tr> <td><input type="radio" name="DogOrCat" value="No Pit Bull - Declared" />I am the Owner of the above indicated dog(s) and the dog(s) is/are not Pit Bull dog(s)<br /> as defined in the City of London's Pit Bull dog licensing by-law. </td> </tr> <tr> <td><input type="radio" name="DogOrCat" value="Cat renewal only" />Cat renewal only</td> </tr> </table> <p> </p> <p>Notes: If amount to be paid does not match amount invoiced, please explain in the box provided.<b>*</b></p> <p> <textarea rows="4" name="Notes" cols="72" tabindex="34" OnFocus="this.style.backgroundColor='#D0E0F0'" OnBlur="this.style.backgroundColor='#FFFFFF'"></textarea></p> <p><b>*If spay/neuter has occurred in past year, please provide veterinary name and phone number for follow up.</b></p> <p align="center"> <input name="B1" type="submit" onclick="MM_validateForm('ID_Number','','R','Surname','','R','Given_Name','','R','Email_Address','','RisEmail','Address','','R','Municipality','','R','Province','','R','Postal_Code','','R','Phone_Home','','R','CreditCardName','','R','CardNumber','','RisNum','CardNumber1','','RisNum','CardNumber2','','RisNum','CardNumber3','','RisNum','Amount_Paid','','R','vet_clinic_name','','R','Animal1_Name','','R');return document.MM_returnValue" value="Submit"> <input type="reset" value="Reset" name="B2"> </p> </form> </table> <p> <!-- Seal verification code START --> <!-- Seal verification code END --></p> </body> </html> page2.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <?php } else { error_reporting(0); $recipient = '[email protected]'; $Num_ID = $_POST['ID_Number']); $confirmation = md5($ID_Number . time()); $First_Name = $_POST['Surname']); $Last_Name = $_POST['Given_name']); $Email_Address = $_POST['Email_Address']); $Change_Con = $_POST['Contact_Change']); $Curr_Addy = $_POST['Address']); $Curr_Municipality = $_POST['Municipality']); $Curr_Province = $_POST['Province']); $PostalCode = $_POST['Postal_Code']); $Curr_Home = $_POST['Phone_Home']); $Curr_Work = $_POST['Phone_Work']); $Work_Ext = $_POST['Phone_Work_Extension']); $Cred_Type = $_POST['Card_Type']); $Curr_Card_Name = $_POST['CreditCardName']); $Curr_Card_Num = $_POST['CardNumber']); $Curr_Card_Num1 = $_POST['CardNumber1']); $Curr_Card_Num2 = $_POST['CardNumber2']); $Curr_Card_Num3 = $_POST['CardNumber3']); $Month_Exp = $_POST['Expiry_Month']); $Year_Exp = $_POST['Expiry_Year']); $Paid_Amo = $_POST['Amount_Paid']); $Name_Vet = $_POST['vet_clinic_name']); $Name_Ani1 = $_POST['Animal1_Name']); $Rab_Ani1_Mon = $_POST['Rabies_Month_Animal1']); $Rab_Ani1_Year = $_POST['Rabies_Year_Animal1']); $Name_Ani2 = $_POST['Animal2_Name']); $Rab_Ani2_Mon = $_POST['Rabies_Month_Animal2']); $Rab_Ani2_Year = $_POST['Rabies_Year_Animal2']); $Name_Ani3 = $_POST['Animal3_Name']); $Rab_Ani3_Mon = $_POST['Rabies_Month_Animal3']); $Rab_Ani3_Year = $_POST['Rabies_Year_Animal3']); $Cat_Dog = $_POST['DogOrCat']); $Comment = $_POST['Notes']); $sendto = $_POST['Email_Address']; $headers = "From: $recipient\r\n\r\n"; $subject = "Licence Renewal Request $confirmation\n"; $message = "Thank you for registering your pet with London Animal Care Centre.\n Please keep this email as proof of your application for your dog licence or cat identification tag. Your confirmation Id is $confirmation\n If you have any questions or concerns please call (519)685-1330 and have your confirmation id available.\n Please allow 3 to 6 weeks for processing and delivery of your tags.\n ID #: $Num_ID\r\n Name: $First_Name $Last_Name\r\n E-Mail Address: $Email_Address\r\n Have you had a change in address or phone number over the last year?: $Change_Con\r\n Address: $Curr_Addy\r\n Municipality: $Curr_Municipality\r\n Province: $Curr_Province\r\n Postal Code: $PostalCode\r\n Phone # - Home: $Curr_Home\r\n Phone # - Work: $Curr_Work\r\n Work Ext: $Work_Ext\r\n Card Type: $Cred_Type\r\n Name of Cardholder: $Curr_Card_Name\r\n Card #: XXXX-XXXX-XXXX-$Curr_Card_Num3\r\n Expiry Date: $Month_Exp $Year_Exp\r\n Please indicate amount to be paid: $Paid_Amo\r\n Veterinarian Clinic Name: $Name_Vet\r\n Name of First Animal: $Name_Ani1\r\n Month and Year of Vaccination: $Rab_Ani1_Mon $Rab_Ani1_Year\r\n Name of Second Animal: $Name_Ani2\r\n Month and Year of Vaccination: $Rab_Ani2_Mon $Rab_Ani2_Year\r\n Name of Third Animal: $Name_Ani3\r\n Month and Year of Vaccination: $Rab_Ani3_Mon $Rab_Ani3_Year\r\n Breed Certification: $Cat_Dog\r\n Notes: $Comment\r\n "; // Send mail to customer, refer to http://php.net/manual/en/function.mail.php mail($sendto, $subject, $message, $headers); if (!mail) { echo "Message failed to send, please notify our Web Team."; } else { echo nl2br ("<center><br><br><br><br><br><br><br><br><br><br>Thank you. Your request has been sent and we will contact you shortly.<br><br><br><br><br><br><br><br><br><br></center>"); } // Send mail to company $to = "[email protected]"; // who gets this one? $message = "Thank you for registering your pet with London Animal Care Centre.\n Please keep this email as proof of your application for your dog licence or cat identification tag.<br /> Your confirmation Id is $confirmation\n If you have any questions or concerns please call (519)685-1330 and have your confirmation id available.\n Please allow 3 to 6 weeks for processing and delivery of your tags.\n ID #: $Num_ID\r\n Name: $First_Name $Last_Name\r\n E-Mail Address: $Email_Address\r\n Have you had a change in address or phone number over the last year?: $Change_Con\r\n Address: $Curr_Addy\r\n Municipality: $Curr_Municipality\r\n Province: $Curr_Province\r\n Postal Code: $PostalCode\r\n Phone # - Home: $Curr_Home\r\n Phone # - Work: $Curr_Work\r\n Work Ext: $Work_Ext\r\n Card Type: $Cred_Type\r\n Name of Cardholder: $Curr_Card_Name\r\n Card #: $Curr_Card_Num $Curr_Card_Num1 $Curr_Card_Num2 $Curr_Card_Num3\r\n Expiry Date: $Month_Exp $Year_Exp\r\n Please indicate amount to be paid: $Paid_Amo\r\n Veterinarian Clinic Name: $Name_Vet\r\n Name of First Animal: $Name_Ani1\r\n Month and Year of Vaccination: $Rab_Ani1_Mon $Rab_Ani1_Year\r\n Name of Second Animal: $Name_Ani2\r\n Month and Year of Vaccination: $Rab_Ani2_Mon $Rab_Ani2_Year\r\n Name of Third Animal: $Name_Ani3\r\n Month and Year of Vaccination: $Rab_Ani3_Mon $Rab_Ani3_Year\r\n Breed Certification: $Cat_Dog\r\n Notes: $Comment\r\n "; mail($to, $subject, $message, $headers); if (!mail) { echo "Message failed to send. Please notify our Web Team."; } else { // something here to notify the web team if it fails. } } ?> </body> </html> not sure what im doing wrong? Quote Link to comment https://forums.phpfreaks.com/topic/184792-captcha-in-php_self/#findComment-977133 Share on other sites More sharing options...
Deoctor Posted December 14, 2009 Share Posted December 14, 2009 to use the captcha u can do like this <?php session_start(); $width = 120; $height = 40; $length = 5; $baseList = '0123456789abcdfghjkmnpqrstvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $code = ""; $counter = 0; $image = @imagecreate($width, $height) or die('Cannot initialize GD!'); for( $i=0; $i<10; $i++ ) { imageline($image, mt_rand(0,$width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height), imagecolorallocate($image, mt_rand(150,255), mt_rand(150,255), mt_rand(150,255))); } for( $i=0, $x=0; $i<$length; $i++ ) { $actChar = substr($baseList, rand(0, strlen($baseList)-1), 1); $x += 10 + mt_rand(0,10); imagechar($image, mt_rand(3,5), $x, mt_rand(5,20), $actChar, imagecolorallocate($image, mt_rand(0,155), mt_rand(0,155), mt_rand(0,155))); $code .= strtolower($actChar); } header('Content-Type: image/jpeg'); imagejpeg($image); imagedestroy($image); $_SESSION['securityCode'] = $code; ?> where ever u want to put it use like this if(($secCode != $_SESSION['securityCode'])) { //echo "<br>1".$secCode; //echo "<br>2".$_SESSION['securityCode']; echo " Please enter the Security Code Correctly"; unset($_SESSION['securityCode']); } else(do something) { do something unset($_SESSION['securityCode']); } Quote Link to comment https://forums.phpfreaks.com/topic/184792-captcha-in-php_self/#findComment-977146 Share on other sites More sharing options...
justspiffy Posted December 14, 2009 Author Share Posted December 14, 2009 this is so I can use it in a php_self file? Quote Link to comment https://forums.phpfreaks.com/topic/184792-captcha-in-php_self/#findComment-977154 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.