Buenas, he escrito lo que me has dicho y ahora con el or die me reporta el fallo que tenia, me dice: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'in, out, ratio) values ('gg','www', 0, 0, 0, 1, 0)' at line 1
El archivo guardar.php me ha quedado asi:
Código PHP:
<?
include"conexion.php";
$in24=0; //Inicializo los valores de in, out y ratio, ya que no son campos rellenables por el usuario
$out24=0;
$in=0;
$out=1;
$ratio=0;
$dominio=$_POST['dominio'];
$nombre=$_POST['nombre'];
$insertar="INSERT INTO webs (dominio, nombre, in24, out24, in, out, ratio) values ('$dominio','$nombre', $in24, $out24, $in, $out, $ratio)";
mysql_query($insertar) or die (mysql_error());
echo" <html>
<head></head>
<body>
<h3>Los datos han sido guardados</h3>
</body>
</html>";
include "cerrar_conexion.php";
?>
Lo de error en line 1 no lo entiendo, si el error esta en la linea 1 porque pone que el error esta cerca de ....(for the right syntax to use near 'in, out, ratio) values ('gg','www', 0, 0, 0, 1, 0)' at line 1)
Saludos, y muchas gracias!!