[jQuery] jquery form multiple php variables
Hi, I am trying to use the jquery form plugin and i have 3 form fields i need to go to php and come back and be inserted into a list. I am having trouble getting more than 1 php variable to return. here is the code example i am using $('#addLinks').ajaxForm({ // dataType identifies the expected content type of the server response dataType: 'json', // success identifies the function to invoke when the server response // has been received success: processJson }); function processJson(data) { // 'data' is the json object returned from the server alert(data.message); } and the php ?php echo '{ message: ' . $_POST['message']. ' }'; ? How can i return more than 1 variable and specify what returns where? I am very confused on this thanks
[jQuery] jquery form multiple php variables
Hi, I am trying to use the jquery form plugin and i have 3 form fields i need to go to php and come back and be inserted into a list. I am having trouble getting more than 1 php variable to return. here is the code example i am using $('#addLinks').ajaxForm({ // dataType identifies the expected content type of the server response dataType: 'json', // success identifies the function to invoke when the server response // has been received success: processJson }); function processJson(data) { // 'data' is the json object returned from the server alert(data.message); } and the php ?php echo '{ message: ' . $_POST['message']. ' }'; ? How can i return more than 1 variable and specify what returns where? I am very confused on this thanks