con Posted March 18, 2010 Share Posted March 18, 2010 This page works just fine http://www.houseofspeed.com.au/coz/contactus.html Here is the PHP that checks the code. You can see where it checks and then says yes its OK and then runs the contact.php file I am curious to know when it fails can there be a pop up window stating that the code was wrong and they should try again. While all this is happening I dont want the user to leave the contactus.html page and then also have to re-enter their info. At the moment if it fails it just throws up and quick echo from this php file and then you have to click back, although your info is still there I don't want the user to leave the site. <?php include_once 'common.php'; if(isSet($_POST['security_code'])) { $security_code = trim($_POST['security_code']); $to_check = md5($security_code); if($to_check == $_SESSION['security_code']) { include_once('contact.php'); } else { echo 'The security code is <font color="red">incorrect</font>. <br /><br />Please go back and try again.'; } } ?> Link to comment https://forums.phpfreaks.com/topic/195641-image-verification-on-contact-form-pop-up-window-on-incorrect-code-entry/ Share on other sites More sharing options...
con Posted March 22, 2010 Author Share Posted March 22, 2010 any suggestions ? Link to comment https://forums.phpfreaks.com/topic/195641-image-verification-on-contact-form-pop-up-window-on-incorrect-code-entry/#findComment-1029917 Share on other sites More sharing options...
scvinodkumar Posted March 22, 2010 Share Posted March 22, 2010 If you want so, then you need to change the contactus.html to php page and give the action page to same page.. or redirect the user to contactus.html page if there is error. Link to comment https://forums.phpfreaks.com/topic/195641-image-verification-on-contact-form-pop-up-window-on-incorrect-code-entry/#findComment-1029919 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.