You could add a click event to this….
The page testbusget will have a post collect of ‘panelid’
Then it will look up database and return result to screen inside div with class called ‘.test’
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script> idno = 23; //setting var $(document).ready(function() { $.ajax({ url: "timenow.php", dataType: "html", type: 'POST', data: "panelid="+idno, //variable with data success: function(data){ $(".test").html(data); alert(data); } }); }); </script> <div class='test'></div> |
In collecting page
1 2 3 |
$panelid = mysql_real_escape_string($_POST['panelid']); |
And send multiple variables
see here