Tue Jan 01, 2013 8:47 pm
<html>
<head>
<title>Send parameters using GET method</title>
<!--
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
</script>
Note you can download the JQuery package instead of using Google version. -->
<script src="jquery-1.8.3.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$.get("JQuery.php",
{
name:"Tom Andrson",
age:"34"
},function(data,status){
$("div#div1").html("Data: " + data + "\nStatus: " + status);
});
});
});
</script>
</head>
<body>
<button>Send using GET</button>
<div id="div1"></div>
</body>
</html>
<?php
if(isset($_GET['name'])){
$name=$_GET['name'];
}
if(isset($_GET['age'])){
$age=$_GET['age'];
}
echo "<b>Name=</b> $name, <b>Age=</b>$age <br/>";
?>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.