Created
November 19, 2012 23:52
-
-
Save binaryfever/4114969 to your computer and use it in GitHub Desktop.
Insert Customer HTML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <title>insert customer</title></pre> | |
| <!-- include jquery library file--> | |
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
| <script type="text/javascript"> | |
| $(document).ready(function(){ | |
| $("#insert").click(function(){ | |
| //Get the input field values. | |
| var name=$("#name").val(); | |
| var email=$("#email").val(); | |
| //use the $.post() method to call insert.php file.. this is the ajax request | |
| $.post('insertcustomer.php', {name: name, email: email}, function(){ | |
| //you could put some succes message javascript here | |
| }); | |
| return false; | |
| }); | |
| }); | |
| </script> | |
| </head> | |
| <body> | |
| <label>Name: </label> <input id="name" type="text" /> | |
| <label>E-Mail: </label> <input id="email" type="text" /> | |
| <a id="insert" title="Insert Data" href="#">Put into mysql</a> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment