Reputation: 33
My current url is http://webly.com/mysite.php?cat=woman
what is the best way to get "cat" from current url automatically and send it to another page every time the page is loaded
I want to get in http://webly.com/dolor/data.php
=> sex = $_GET['cat']
Upvotes: 0
Views: 169
Reputation: 1971
In the document ready give an ajax call to the data.php with the url data as parameter.
Upvotes: 0
Reputation: 40717
You basically need Ajax.
If you want to do it with jQuery, take a look at the docs.
Please be more specific about what you tried and what you need and I'll gladly expand my answer.
Upvotes: 0
Reputation: 1462
If you have jquery on your page, then you should do this -
$.get("http://webly.com/dolor/data.php" + window.location.search);
window.location.search will give you the entire search string.
Upvotes: 1