Saturday, 15 May 2010

html - Why does my PHP reCAPTCHA only display on Chrome and Safari? -



html - Why does my PHP reCAPTCHA only display on Chrome and Safari? -

i'm using php recaptcha on company's website. followed tutorial https://developers.google.com/recaptcha/docs/php pretty straightforward. anyway, displays , submits fine on chrome , safari, on ie10 , firefox recaptcha box doesn't show client-side. diverge tutorial in way don't have separate verification page, still don't see how impact image displaying on various browsers. suggestions?

<?php $page = "visit"; include 'layout/topnav.php'; ?> <script language="javascript"> function formvalidate() { if (document.data.comments.value == "") { alert("please include quick question"); homecoming false; } else if (document.data.email.value == "") { alert("please include email."); homecoming false; } else homecoming true; } </script> <?php $added = false; if (isset($_post['submit1'])){ require_once('recaptchalib.php'); $privatekey = "xxxxx"; $resp = recaptcha_check_answer ($privatekey, $_server["remote_addr"], $_post["recaptcha_challenge_field"], $_post["recaptcha_response_field"]); if (!$resp->is_valid) { // happens when captcha entered incorrectly echo "your captcha response not accepted. please seek again. see help button right of entry field larn more."; $email=$_post['email']; $comments=$_post['comments']; $added = false; } else { // code here handle successful verification /* add together database */ $email = ''; $comments = ''; $added = true; } } if(!$added) { ?> <html> <head> <body> <!-- body tag required or captcha may not show on browsers --> <form method="post" action="quick_question.php" name="data" onsubmit="return formvalidate()"> <b>your quick question:<font color="red">*</font></b><br /> <textarea wrap="hard" name="comments" rows="5" cols="55" id="question" class="inputbox" ><? echo $comments?></textarea> <table cellpadding="0"> <tr> <td width="40%" valign="top"><b>your e-mail:<font color="red">*</font></b></td> </tr> <tr> <td><input type="text" name="email" size="10" id="email" class="inputbox" value="<? echo $email?>"/></td> </tr> <tr><td> <b>captcha verification:</b><font color="red">*</font> </td></tr> <tr><td> <?php require_once('recaptchalib.php'); $publickey = "yyyy"; // got signup page echo recaptcha_get_html($publickey); ?> </td></tr> <tr><td id="submit"> <input type="submit" name="submit1" /> </td></tr> </table> </form> </body> </html> <?php } ?>

google chrome likes auto right bad html syntax. create sure recaptcha_get_html() function returns proper html code. recaptcha_get_html function?

does source code contain recaptcha stuff, or exclusively missing?

do have illustration of web page somewhere live?

sorry marked answer, can not comment on posts still?

php html cross-browser recaptcha

No comments:

Post a Comment