Jump to content

Search the Community

Showing results for tags 'recaptcha php error'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (Dreamweaver, Zend, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hi All, Very new to PHP so I wonder if you can help. I have set up a form with Recaptcha on it. The form posts the information on the front page (which works). The only problem is that I want the code to send the user back to the home page. <?php require_once('recaptchalib.php'); $privatekey = "6LfxZN8SAAAAAIxozrSnTxTgrAljrQlM0R7k8yEQ"; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { // What happens when the CAPTCHA was entered incorrectly die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." . "(reCAPTCHA said: " . $resp->error . ")"); } elseif { // Your code here to handle a successful verification ($_POST['submit']){ $connect = mysql_connect("localhost","hautopsy_root","Kings!123") or die ("couldnt connect"); $db = mysql_select_db("hautopsy_netconfess") or die ("database error"); $nc='nc'; $name = strip_tags($_POST['name']); $confession = ($_POST['confession']); $datetime = date ("Y:m:d:H:m:s"); $query = mysql_query("insert into nc (name, confession, datetime) values('$_POST[name]', '$_POST[confession]', '$datetime')") or die ("failed to insert"); header('Location: http://www.example.com/'); }else{ header("Location: index.php"); } } ?> I am using header("Location: index.php"); but it just seems to be staying on the same page. Thanks
×
×
  • 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.