Setting up captcha with a conditional
Posted: Wed Nov 11, 2009 8:05 pm
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
this is the bit that came wit recaptcha and loads the process , above that was my first attempt at a conditional.
any help getting this working would be huge.
Thanks in advance
Please if any one can tell me where im going wrong. cheers
Code: Select all
<center>
<?
$random_number = rand(1,10);
if ( $random_number <= 7 )}
{else}
require_once('recaptchalib.php');
$publickey = "*****"; // you got this from the signup page
echo recaptcha_get_html($publickey);
{
?>
</center>this is the bit that came wit recaptcha and loads the process , above that was my first attempt at a conditional.
Code: Select all
require_once('recaptchalib.php');
$publickey = "*****"; // you got this from the signup page
echo recaptcha_get_html($publickey);
{Thanks in advance