Tengo este codigo pero me sale un error Parse error: syntax error, unexpected variable "$msg", expecting "{" in C:\xampp\htdocs\issste\login.php on line 15
<?php
session_start();
if(isset($_GET['close']) && $_GET['close']==1){
session_unset();
session_destroy();
}
if(!isset($_SESSION['permisos']))
$_SESSION['permisos'] = Array();
require_once('lib/globals.php');
require_once('lib/db.php');
function CONECTAR()
$msg = ""
if ( isset($_POST['submit']) && $_POST['submit']=="INGRESAR" );{
$stmt = mysql_query("SELECT USER_ID, USU_CVE, USERGROUP FROM CMFUSERS WHERE USU_CVE='".$_POST['username']."' AND USU_PSW='".$_POST['pwd']."'");
$existeuser = mysql_num_rows($stmt);
if ($existeuser){
list($user,$userid,$usergroup) = mysql_fetch_row($stmt);
$_SESSION["status"] = "Logged";
$_SESSION['userid'] = $userid;
$_SESSION['user'] = $user;
$_SESSION['permisos'] = split(",",$usergroup);
//header("Location: menup.php");
echo ("<script> window.open(\"menup.php\",\"win\",\"top=0,left=0,scrollbars=yes,status,resi zable=no\"); window.opener = top; window.close(); </script>");
/* echo ("<script> window.close(); </script>"); */
/*
?>
<script type="text/javascript" language="javascript">
window.open("menup.php", "...::: ISSSTE :::...","width=612, height=500, scrollbars=yes, menubar=no, location=no, resizable=no");
close();
</script>
<?php
*/
exit;
}else
$msg = "El usuario y/o la contraseña no corresponden, por favor verifique.";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>...::: ISSSTE :::...</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="keywords" content="">
<meta name="description" content="">
<link href="includes/issste.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function validateForm(){
var myform = document.frm_login;
if (myform.username.value==''){
alert("Por favor escriba su nombre de usuario.");
myform.username.focus();
return false;
}
if (myform.pwd.value==''){
alert("Por favor escriba su password.");
myform.pwd.focus();
return false;
}
}
//-->
</script>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" background="images/headxx.jpg"> <div align="left"><img src="images/head1x.jpg" alt="" width="778" height="145"> </div></td>
</tr>
<tr>
<td colspan="2" class="bg1" style="height:32px;"> </td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr valign="top">
<td colspan="5">
<table border="0" align="center" cellspacing="18" cellpadding="0">
<tr>
<td>
<table align="center" border="0" cellpadding="3" cellspacing="0">
<tr>
<td width="297"><img src="images/issste46.jpg" width="150" height="162"></td><!-- logo.png -->
<td valign="bottom"> </td>
<td><img src="images/doctores.png" width="297" height="150"></td>
</tr>
<tr>
<td colspan="3">
<p align="center">INGRESO A MODULOS</p>
<p align="center">Por favor ingrese los datos requeridos.</p>
<?php
if ( $msg!="" ) echo "<p align=\"center\"><font color=\"red\"><strong>$msg</strong></font></p>";
?>
<table align="center" width="40%" border="0" cellpadding="3" cellspacing="0">
<form action="login.php" name="frm_login" id="frm_login" method="POST" onSubmit="return validateForm();">
<tr>
<td width="50%" align="right">USUARIO: </td>
<td width="50%"><input name="username" type="text" id="username" class="input1" /></td>
</tr>
<tr>
<td width="50%" align="right">CONTRASEÑA: </td>
<td width="50%"><input name="pwd" type="password" id="pwd" maxlength="8" class="input1" /></td>
</tr>
<tr>
<td colspan="2"><div align="center"> </div></td>
</tr>
<tr>
<td colspan="2">
<div align="center">
<input name="submit" type="submit" class="button1" value="INGRESAR">
</div></td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="5" align="center" class="bg4" style="height:44px;"> </td>
</tr>
<tr>
<td colspan="5" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td colspan="5" align="center" bgcolor="#FFFFFF" class="text1">ISSSTE </td>
</tr>
<tr>
<td colspan="5" align="center" bgcolor="#FFFFFF" class="text1"> </td>
</tr>
</table>
</body>
</html>
<?php{
// close connection
mysqli_close();
?>
</body>
</html>
<?php