<script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript">function searchNow() {var a=$("#h").val();var b=$("#hi").val();var dataString = 'name='+ a + '&namei=' + b;//your validation code$.ajax( {type:"POST",async: false,url:"register.php",data: dataString,success: function(data)
{alert("test");$("#message").html(data);}} );}</script><input type = "text" name = "name" id="h"><input type = "text" name = "namei" id="hi" ><input type = "button" name = "name" id="i" onClick="searchNow();"><div id="message"></div>
//in regisrer.php:$a=$_POST['name'];$b=$_POST['namei'];echo $a;echo "<br>";echo $b;
Sunday, 10 February 2013
AJAX-JQUERY-PHP
Subscribe to:
Posts (Atom)