Let’s say that I have two links.
<li><a href="#" id="VALUE1" class="charName">Name 1</a></li>
<li><a href="#" id="VALUE2" class="charName">Name 2</a></li>
And when I click one of these links jQuery passes the ID of the link I clicked to a PHP file without reloading the page.
Due to the fact that the id’s will not be constants I assume this.id will need to be used in the jQuery.
Then in the PHP file the id is put into a variable then sent to the database. Such as,
$var = JQUERY?
insert db...
I am just stumped on how to create the jQuery needed to send the ID to the PHP file. And then to retrieve that non-constant ID using PHP.
How might I got about doing this?
you have to implement some ajax to achieve the same , lets have a click handler for a href first.
And then make a ajax call