I am trying to save mysql the data that you enter in the form
but the php is giving me errors like this: Parse error: syntax error, unexpected '[' in C:\wamp\www\Tarea2\index.php on line 5
Here the code:
<?php
if(isset($_POST['btnGuardar'])){
$con = mysqli_connect("localhost","Elvisdt17","taveras17","personas");
$nombre = _POST['nombre'];
$apellido = _POST['apellido'];
$tel = _POST['telefono'];
$email = _POST['email'];
$dir = _POST['direccion'];
$sexo = _POST['sexo'];
$sangre = _POST['tipoSangre'];
$cedula = _POST['cedula'];
mysqli_query($con, "INSERT INTO gente (Nombre, Apellido, Sexo, Telefono, Email, Cedula, Direccion, Tipo_sangre)
VALUES('$nombre', '$apellido', '$sexo', '$tel', '$email', '$cedula', '$dir', '$sangre')");
mysqli_close($con);
}?>
Could you help me?