Mi form:
Código HTML:
Ver original
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body> <form id="form1" name="form1" method="post" form action="conexion.php"> <input name="numero" type="text" /> <input name="codigo" type="text" /> </form> </body>
Codigo PHP , donde me conecto a la base de datos y se supone que guarda los registros
Código PHP:
Ver original
<?php global $host,$user,$pass,$database; $host="mysql.hostinger.es"; $user="000_benito"; $pass="benitocamelas"; $database="u000000_form"; $numero=$_POST['numero']; $codigo=$_POST['codigo']; mysql_query("INSERT INTO tabla VALUES ('','$numero','$codigo')",$link) or die ("<h2>error de envio</h2>"); echo "<script languaje='javascript'>alert('conexion establecida')</javascript>"; ?>
Este es el error que me salta en la linea 10:
Código Java:
Ver original
Warning: mysql_select_db() expects parameter 1 to be string, resource given in /home/u0000/public_html/conexion.php on line 10 Warning: mysqli_error() expects parameter 1 to be mysqli, resource given in /home/u0000/public_html/conexion.php on line 10 error a conectarse base de datos
Qué estoy haciendo mal?, Gracias
![Patada](http://static.forosdelweb.com/fdwtheme/images/smilies/footinmouth.png)