Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/01/2013, 13:49
Avatar de andres_15_
andres_15_
 
Fecha de Ingreso: septiembre-2008
Ubicación: Cali
Mensajes: 232
Antigüedad: 15 años, 7 meses
Puntos: 7
¿Que anda mal?

No se si es el xampp, pero no quiere andar este codigo. Me dice que mysqli_query espera un parametro pero ya los tiene
Cita:
Warning: mysqli_query() expects parameter 1 to be mysqli, string given in C:\xampp\htdocs\prueba\Ingresar\ingresarnuevo.php on line 27
adjunto codigo

Código PHP:
<?php

include("../Conexion/conexion.php");
session_start();

if (
$_POST){


$id=$_POST["id"];

$name=$_POST["nombres"];


$fecha=$_POST["text"];


$tisa=$_POST["tisa"];


$rh=$_POST["rh"];



$sql="insert into empleados (Id,Nombres,FechaExpedicion,TipoSangre,RH) values
('$id','$name','$fecha','$tisa','$rh');"
;

$datos=mysqli_query($sql,$con);

}


?>



<html>
<head>
<title>
Prueba
</title>
</head>
<body>


<form action="" method="post">

<fieldset>
<legend>
Nuevo Empleado
</legend>


<label>

Identificación <input type="text" name="id">
</label>


<label>

Nombres <input type="text" name="nombres">
</label>


<label>

Fecha expedicion <input type="text" name="text">
</label>


<label>
Tipo de Sangre <input type="text" name="tisa">
</label>


<label>
RH 
+<input type="radio" name="rh">
-<input type="radio" name="rh">
</label>


<label>
 <input type="submit" value="Nuevo">
</label>


</fieldset>

</form>

</body>
</html>