Hello all,

For my form submission handling, I am posting data from jQuery into PHP, which the PHP handles the form validation/database writing/etc., and I am getting back the proper response I need in pretty much any case from the PHP script.

The problem is the .ajax() request is behaving oddly. If I make an invalid submission on the form, I get a success alert from the JavaScript; whereas, if I make a valid submission, the .ajax() gives me a failure message. Strange.

This was a thread in the PHP forum when the original objective was to catch if the e-mail address submitted is a duplicate in the database. This seems not to be a PHP problem but solely a JavaScript one.

			  type: "POST",
			  dataType: 'json',
			  cache: false,
			  url: "Scripts/confirmform.php",
			  data: { 
				  origEmail: origEmail,
				  confirmEmail: confirmEmail,
				  name: name,
				  age: age,
				  gender: gender,
				  country: country,
				  catcher: catcher,
				  addition: addition,
				  mathAnswer: mathAnswer,
				  submissionTime: submissionTime 
			  success: function(data) {
			  error: function(data) {
			  complete: function() {
If you want to play with the form submits yourself to see what I'm seeing, my website is here and the 1st form is in the bottom-right side (only the 2nd form is the problem).