1 Replies - 4819 Views - Last Post: 11 July 2011 - 07:15 PM

#1 itdoell  Icon User is offline

  • D.I.C Head

Reputation: 8
  • View blog
  • Posts: 239
  • Joined: 13-January 11

How do I retrieve values from PHP file?

Posted 11 July 2011 - 05:29 PM

I want to retrieve the posted results from a php file using AJAX.

I just have a basic validation that echo's a 1 if it is successful and a 0 if it is unsuccessful. How can I retrieve this value? I'm using a jquery form plugin to post the values to database. But how would I retrieve the 1 or the 0?


<scriptsrc="body-parts/jquery.form.js"></script>
   <script> 
       $(document).ready(function() { 
           $('#formpost').ajaxForm(function() { 
	
//Retrieving values should likely go here.

           }); 
       }); 
   </script> 


Is This A Good Question/Topic? 0
  • +

Replies To: How do I retrieve values from PHP file?

#2 itdoell  Icon User is offline

  • D.I.C Head

Reputation: 8
  • View blog
  • Posts: 239
  • Joined: 13-January 11

Re: How do I retrieve values from PHP file?

Posted 11 July 2011 - 07:15 PM

Okay, I figured it out using the documentation for the plugin. You can call back using JSON. I won't go into details but the documentation is here.

http://jquery.malsup.com/form/#json

Thanks anyway guys
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1