ueon Posted July 12, 2011 Share Posted July 12, 2011 I'm trying to make it so that when I click on the button, data in the 3 input fields above is sent to education.php as POST data. I spend the day looking at the jQuery and is having a hard time applying it since I don't have a javascript background. I'm barely getting by with AJAX and AJAX is a crucial component in this project. what is the AJAX/jQuery snippet to make the following code work? echo "<input id='uni' value='$uni' type='text' />"; echo "<input id='class' value='$class' type='text' />"; echo "<input id='program' value='$program' type='text' />"; echo "<input id='submitedcu' value='Save Education' type='submit' /> Link to comment https://forums.phpfreaks.com/topic/241835-send-data-post/ Share on other sites More sharing options...
AyKay47 Posted July 12, 2011 Share Posted July 12, 2011 this will take you step by step on creating an XMLHttpResponse via AJAX and submit data via POST/GET methods Link to comment https://forums.phpfreaks.com/topic/241835-send-data-post/#findComment-1241937 Share on other sites More sharing options...
RichardRotterdam Posted July 17, 2011 Share Posted July 17, 2011 I'm not going to give you the code that does what you want. But I will give an attempt to explain how to do it. First you need to get the values from the input elements which would look something like this using jQuery. jQuery('input#your_id_attribute_here').val(); You can get more info from the manual here http://api.jquery.com/val/ As for making the post work check out: http://api.jquery.com/jQuery.post/ Link to comment https://forums.phpfreaks.com/topic/241835-send-data-post/#findComment-1243664 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.