This is the code that I have of the button (The variables are equal to the result of a query, I checked and they are fine):
echo '<input type="button" value="ELIMINAR" class="btnForm" onClick="eliminar('.$idEvento.','.$nombre.')" /> ';
Now we see the code of the remove function:
function eliminar(id,nombre)
{
if(confirm('¿Estas seguro de que desea eliminar la actividad?')){
location.href="eliminacion.php?id="+id+"&nombre="+nombre;
return true;}
else
return false;
}