I have 2 files:
load.html and colors.php
The load.html file is:
<html>
<head>
<script type="text/javascript" src="../jquery.js"></script>
<script type="text/javascript">
var x;
x=$(document);
x.ready(inicio);
function inicio(){
var x;
x=$("a");
x.click(muestrame);
}
function muestrame(){
var pagina=$(this).attr("href");
var x=$("#hablame");
x.load(pagina);
return false;
}
</script>
<style type="text/css">
</style>
</head>
<body>
<a href="colores.php?color=verde">Hablame del verde</a>
<a href="colores.php?color=rojo">Hablame del rojo</a>
<a href="colores.php?color=azul">Hablame del azul</a>
<div id="hablame"></div>
</body>
</html>
And the colors.php file is:
<?php
if($_GET['color'] == "verde"){
echo "El color verde es muy relajante";
}
if($_GET['color'] == "rojo"){
echo "El color rojo es muy pasional";
}
if($_GET['color'] == "azul"){
echo "El color azul es muy templado";
}
?>
When the load.html web is loaded and I click on hyperlinks, the sql code does not work and does nothing.
Thank you in advance for the support provided.
Slds Luis