<?php
	if(isset($_POST['first_name']) && isset($_POST['last_name']) && isset($_POST['email']))
	{
		// include Database connection file 
		include("db_connection.php");

		// get values 
		$first_name = $_POST['first_name'];
		$last_name = $_POST['last_name'];
		$dni = $_POST['dni'];
		$email = $_POST['email'];
		$doc = $_POST['doc'];
		$clinica = $_POST['clinica'];

		//$query = "INSERT INTO users(paciente, nombre, email) VALUES('$first_name', '$last_name', '$email')";
		$query = "INSERT INTO `tabla1` (`id_pac`, `paciente`, `nombre`, `direccion`, `dni`, `localidad`, `telefono`, `celular`, `email`, `dia`, `day`, `month`, `year`, `lugar`, `nacionalidad`, `civil`, `ocupacion`, `clinica`, `obra`, `num_obra`, `ficha`, `iva`, `notas`, `observaciones`, `creado`, `sucursal`, `usuario`, `num_usuario`, `deuda`, `plan`) VALUES (NULL, '$first_name', '$last_name',NULL,'$dni',NULL,NULL,NULL,'$email','1934-06-30', '30', '06', '1934','83',NULL,NULL,'','$clinica',NULL,'','',NULL,'',NULL,'2015-12-19',NULL,'$doc','10',NULL,'<p></p>');";
		
		if (!$result = mysqli_query($con, $query)) {exit(mysqli_error($con));}
		
	    echo "1 Paciente Agregado!";
	}
?>