[jQuery] jQuery.ajax form submission to MySQL

[jQuery] jQuery.ajax form submission to MySQL


Hi guys.
I'm using Wordpress CMS where I have created a custom form. I would
like to store the input from this form in a database (MySQL).
I've posted my problem here: http://stackoverflow.com/questions/852054/store-form-data-in-mysql-with-jquery-ajax
, but I think maybe this forum is a better place for mye problem.
I have the following script:
jQuery.processForms = function()
{
jQuery('form#store_data_form').submit(function()
{
var store_name = 'Test store'; //jQuery("input#store_name").val();
var store_street1 = 'Sesamy street';//Set constant for testing
var store_zipcode = '0574'; //Set constant for testing
var dataString = 'name='+ store_name + '&street1=' + store_street1
+ '&zipcode=' + store_zipcode;
jQuery.ajax(
{
type: "POST",
url: "../includes/storelocator/process_frm_store.php",
data: dataString,
error: function(XMLHttpRequest, textStatus, errorThrown)
{
alert(errorThrown); // Just for debugging
jQuery('#suggestNewStore div.error').fadeIn();
},
success: function()
{
alert('It works!');
jQuery('#suggestNewStore div.success').fadeIn();
}
});
return false;
});
}
Firebug is reporting a 404 Not Found. I've tried several different
paths in the url property. But no mather what, it can't locate the
process_frm_store.php.
The error message is also triggered, but that only says 'Undefined' -
I have no idea what that means.