vinn1e Posted November 12, 2009 Share Posted November 12, 2009 hey guys im new to codding and am in deep , lol want to insert a captcha in my script but alternate it appearing based upon a random number. Please if any one can tell me where im going wrong. cheers Line number On/Off | Expand/Contract 1. 2. 3. 4. <center> 5. //start php <? 6. $random_number = rand(1,10); 7. if ( $random_number <= 7 )} 8. {else} 9. require_once('recaptchalib.php'); 10. $publickey = "*****"; // you got this from the signup page 11. echo recaptcha_get_html($publickey); 12. { 13. //end php ?> 14. </center> this is the bit that came wit recaptcha and loads the process , above that was my first attempt at a conditional. Line number On/Off | Expand/Contract 1. require_once('recaptchalib.php'); 2. $publickey = "*****"; // you got this from the signup page 3. echo recaptcha_get_html($publickey); 4. { any help getting this working would be huge. Thanks in advance Link to comment https://forums.phpfreaks.com/topic/181201-creating-a-conditional/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.