I have the following code in php:
<?php
include ("conex.php");
if ($_SERVER["REQUEST_METHOD"] == "POST"){
$centro = mysqli_real_escape_string($con,$_POST['centro']);
$descripcion = mysqli_real_escape_string($con,$_POST['descripcion']);
if($centro<> "" and $descripcion <> "")
{
session_start();
$congregacion = $_SESSION['congregacion'];
$sql = "INSERT INTO centros_salidas (id_centro, id_congregacion, nombre, descripcion) VALUES (NULL, '$congregacion', '$centro', '$descripcion')";
mysqli_query($con, $sql);
echo mysqli_error($con);
if(mysqli_affected_rows($con)){
mysqli_close( $con);
$html= 1;
}else{
mysqli_close($con);
$html= 0;
}
}else{
$html.= 2;
}
echo $html;
}
?>
I get the following error message:
Parse error: syntax error, unexpected end of file in C: \ AppServ \ www \ Control_Territorios \ php \ reg_territorio.php on line 25.
and I'm really looking to see if I need some {or any; but I do not see that I need anything, it is more the error tells me that it is online 25 which is the end of the script, I do not know what it could be.
I appreciate your help.