Sorry folks but I asked a question earlier and perhaps did not explain myself very well at all. I answered the question myself to prevent further replies and hopefully to reset the question in a more basic format, as none of the answers worked/explained to me, stress to me, how to do it. There were 4 totally different answers to one basic question.
I had hoped the question was quite simple - take a variable from an href then pass that variable through JQuery/ajax to another page and return the results into a div on the original page. In php it is simple i.e.
if(isset($_GET['nameofvariable']): // do this // endif;
I tried all the answers in my previous question with a simple echo $_GET['nameofvariable']; on the receiving page but none of them give me the right result - sorry. Perhpas a simpler version will help me (and hopefully others)
Starting page call it index.php contains just 1 link
<a href="?abc=1" id="#idoflink">Try again</a>
and one div
<div id="testit"></div>
I want to pass "abc" to another page say testit.php which contains 1 line of code
<?php echo $_GET['abc']; ?>
Then print $_GET['abc'] into the div id="testit"
OK, before you all shout, I want to use ajax (or similar) as when I understand this basic function - i.e. sending the variable and getting it to print out into the div id="testit" I then want to run a query on the page testit.php based on the variable abc and to return the results of that query into the div id="testit" without having to refresh the page.
I am trying to laern this Jquery/Ajax thingy, have a reasonable grasp of php - can do this in php but needs a page refresh for my purpose I cannot have a page refresh (even a small one in terms of the time taken to run the eventual query).
Beyond this by being able to understand this simple functionality - ie. send a GET to another page and perform a query and return I can then "develop it out" from my other understandings of JQuery/Ajax and my PHP knowledge.
Sorry if blunt. Thanks for any answers.