blindmind Posted August 1, 2010 Report Share Posted August 1, 2010 Es maz ko saprotu no php, tikai kko uzinstalet, nedaudz pielabot utt. Tatad man vajag lai Recaptcha redirekto uz lapa2.php, ja captcha ir ievadita pareiza. Meginaju ar header location, raksta ka header already sent.. Sheit bus kods: <?php require_once('recaptchalib.php'); $publickey = "garsh penteris ar cipariem un burtiem"; $privatekey = "garsh penteris ar cipariem un burtiem"; # the response from reCAPTCHA $resp = null; # the error code from reCAPTCHA, if any $error = null; # was there a reCAPTCHA response? if ($_POST["recaptcha_response_field"]) { $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if ($resp->is_valid) { echo "yay, tu ievadiji pareizi"; } else { # set the error code so that we can display it $error = $resp->error; } } echo recaptcha_get_html($publickey, $error); ?> Link to comment Share on other sites More sharing options...
DoubleT Posted August 1, 2010 Report Share Posted August 1, 2010 ?><meta http-equip="refresh" content="0; http://tavalapa.lv" /><? Link to comment Share on other sites More sharing options...
blindmind Posted August 3, 2010 Author Report Share Posted August 3, 2010 ^ Paldies. Velviens lieta: Ir divi array, $in_stock un $fresh_out, un man vajadzetu lai vienu no tiem izvelas randoma, ja $instock tad echo instock, $freshout tad echo freshout.. Link to comment Share on other sites More sharing options...
DoubleT Posted August 3, 2010 Report Share Posted August 3, 2010 rand(); ? Link to comment Share on other sites More sharing options...
blindmind Posted August 3, 2010 Author Report Share Posted August 3, 2010 Paldies, diezko viegli izradas. <?php $prize = rand(0, 1); if ( $prize == 1 ) { echo "Item in stock"; } else { echo "Item is fresh out"; } ?> Link to comment Share on other sites More sharing options...
blindmind Posted August 18, 2010 Author Report Share Posted August 18, 2010 Jautajums, nav iespejams kaut ka, kad uzspiezh uz linka, sakas sesija (?), kadu linku tu esi izvelejies? Link to comment Share on other sites More sharing options...
DoubleT Posted August 18, 2010 Report Share Posted August 18, 2010 <a href="manalapa.lv?action=session"> <? if(isset($_GET["action"]) && $_GET["action"] == 'session') { $_SESSION["lol"] = 1; } ?> Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now