I have this code to pass the value of a select on the same page, but I'm passing the value of the select with form ...
<!DOCTYPE html>
<html>
<body>
<form action="a.php">
<select name="miselector" id="miselector" onchange="this.form.submit()">
<option value="">Seleccionar</option>
<option value="coches">Coches</option>
<option value="casas">Casas</option>
</select>
</form>
///Lectura de la variable "en la misma página" desde php
<?php
echo "Select: ".$_GET["miselector"];
?>
</body>
</html>
There will be some way to pass value but with AJAX, because I do not want to load the page but only show the value that I select in PHP.