Cita:
adjunto codigo Warning: mysqli_query() expects parameter 1 to be mysqli, string given in C:\xampp\htdocs\prueba\Ingresar\ingresarnuevo.php on line 27
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>