I have a php script which shows me all folders - categories on my website:
echo "<ul>";
foreach(glob('category/*', GLOB_ONLYDIR) as $dir) {
$dir = str_replace('category/', '', $dir);
echo '<li class="button" onclick="reload();">'.$dir.'</li>';
};
echo "</ul>";
When I click on category JQuery reload a div with content of php file.
function reload(category) {
$("#content").load("send.php");
}
I want to send to that php file name of the category I have had clicked. How can I do that? Thanks for the answer