This is very strange, but when I add the mysql_real_escape_string it doesn't load the page, this is the code that I load like this:
$('.abandalink').click(function(){
var codigo_membro = $(this).attr('codigomembro');
$('#change').load('membrosbanda.php?codigo='+codigo_membro);
});
And this is the membrosbanda.php
$id=$_GET['codigo'];
$conexion=mysql_connect(HOSTNAME,USER,PW) or die("Problemas en la conexion");
mysql_select_db("bandasideral4",$conexion)
or die("Problemas en la selección de la base de datos");
$registros=mysql_query("SELECT * FROM abanda where codigo='$codigo'") or
die("Problemas en el select:".mysql_error());
if I add $id=$_GET['codigo']; to $id = mysql_real_escape_string($_GET['codigo']); it stops working