myscript.js
$(".tablestyleorchideeaanbod").on("click", function() {
var value = $(this).find('tr:first td:first').html();
lastClickedValue = value;
console.log( value );
var test = lastClickedValue
});
So when got clicked on my table with class tablestyleorchideeaanbod, var test will get a value. Let's say for example: hi;
So, var test = hi
Now I need to use this variable in my homepage, index.php. In index.php I want to use the variable; var test, to use in a MYSQL Query.
For example:
SELECT * FROM thisismytable WHERE rowname = var test
How to achieve this?
index.php?test=valuewith a link