Unexpected t_string en código
Hola, me da un error Parse error: syntax error, unexpected T_STRING en la linea 5, pero ya lo releí y nomas no le encuentro... Si alguno me puede ayudar, ando perdido... Gracias de antemano
<?php
// Incluimos la configuracion y conexion a la MySQL.
Include('config.php');
// Definimos la variable $msg por seguridad.
$msg = "";
// Si se apreta el boton Agregar, da la condicion como true.
If($_POST['agregar'])
{
// Verificamos que no alla ningun dato sin rellenar.
If(!empty($_POST['nombre']) || !empty($_POST['RFC']))
{
// Pasamos los datos de los POST a Variables, y le ponemos seguridad.
$nombre = htmlentities($_POST['nombre']);
$RFC = htmlentities($_POST['RFC']);
// Insertamos los datos en la base de datos, si da algun error lo muestra.
$sql = "INSERT INTO base (nombre, RFC) VALUES ('".$nombre."','".$RFC."')";
mysql_query($sql,$link) or die(mysql_error);
// Mostramos un mensaje diciendo que todo salio como lo esperado
$msg = "Persona agendada correctamente";
} else {
// Si hay un dato sin rellenar mostramos el siguiente texto.
$msg = "Falta rellenar algun dato";
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html"; charset="utf-8"/>
<title>Agregar personas</title>
</head>
<style type="text/css">
</style>
<body>
<div class="agenda">
<div id="contenidor">
<table width="100%" height="404" border="0">
<tr>
<td height="38" colspan="3" align="center" valign="middle"><h1>Agregar Persona</h1></td>
</tr>
<tr>
<td colspan="3" valign="top"><center><em><span style="color:red;"><?=$msg;?></span></em></center>
<form action="agregar.php" method="post">
<strong>Nombre</strong><br />
<input type="text" name="nombre" id="nombre" />
<br />
<br />
<strong>Teléfono</strong>
<br />
<input type="text" name="RFC" id="RFC" />
<br />
<br />
<input type="submit" name="agregar" value="Agregar" />
</form>
</td>
</tr>
</table>
</div>
</div>
</body>
</html>