How to get the data; (ex. id:1) with the jQuery.get?
Sitting here and trying to learn jQuery, that seems to be one great framwork! :)
Anyhow, doing a simple .get like this;
- <p class="data">
-
- Get data
-
- </p>
-
- <script>
-
- $("p.data").click(function () {
-
- $.get("test.php", { id: "1" },
-
- function(data){
-
- $("#view").html(data);
-
- });
- });
-
- </script>
-
- <div id="view"></div>
...And now, inte the file test.php I want to fetch the value (1 in this case) to the file test.php...
How do I get it, simply? ;) I want to get the value as a php-variabel, like; <?php $id = id(1); ?>
Tnx for all the help..!