Jump to content

Creating a conditional


vinn1e

Recommended Posts

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

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.