Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Boa tarde a todos. Estou recebendo uma mensagem de erro:
Parse error: syntax error, unexpected '=', expecting '}' in /home/site/www/pag.php on line 44
essa mensagem faz referencia a linha:
if (isset(".$_SESSION['DiaDataNascimento'].")){$DiaDN='".$_SESSION['DiaDataNascimento']."';}
Creio que seja por conta da declaração da varivel que recebe a resgatada pela session.
Erro semelhante era indicado na linha:
<? if (isset($_SESSION['Nome'])){echo "</b><b>" . $_SESSION['Nome'];} ?>
mas resolvi este erro com as aspas e ponto ficando assim:
<? if (isset(".$_SESSION['Nome'].")){echo '</b><b>' " . $_SESSION['Nome'].";} ?>
Alguem que ja tenha passado por problema semenhante ou quem que tenha alguma ideia, poderia dar uma força aí!?!
Desde já agradeço!
Abraço a todos!!
Eis o código na íntegra:
<?
session_start();
$_SESSION['Nome']=$_POST['Nome'];
$_SESSION['DiaDataNascimento']=$_POST['DiaDataNascimento'];
$_SESSION['MesDataNascimento']=$_POST['MesDataNascimento'];
$_SESSION['AnoDataNascimento']=$_POST['AnoDataNascimento'];
$_SESSION['login']=$_POST['login'];
if (isset($_SESSION['login'])){
echo
print "
<!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=iso-8859-1' />
<title></title>
<style type='text/css'>
body {background-color: #ffffff;}
.style17 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; }
</style>
</head>
<body>
<table width='100%' border='0' align='center'>
<tr><form method=post action=proxpagina.php>
<td bordercolor='#c19f62' scope='col'><table width='100%' border='0' cellpadding='0' cellspacing='0'>
<tr>
<th colspan='3' scope='col'><div align='left'><span class='style22'>Dados</span></div></th>
</tr>
<tr>
<td width='39%'><div align='right' class='style17'>Nome</div></td>
<td width='1%'></td>
<td width='60%'><div align='left'><span class='style17'>
<? if (isset(".$_SESSION['Nome'].")){echo '</b><b>' " . $_SESSION['Nome'].";} ?>
</span></div></td>
</tr>
<tr bgcolor='f6efd2'>
<td><div align='right' class='style17'>Data Nascimento </div></td>
<td><span class='style16'></span></td>
<td><div align='left'><span class='style17'>
<?
if (isset(".$_SESSION['DiaDataNascimento'].")){$DiaDN='".$_SESSION['DiaDataNascimento']."';}
if (isset($_SESSION['MesDataNascimento'])){$MesDN=$_SESSION['MesDataNascimento'];}
if (isset($_SESSION['AnoDataNascimento'])){$AnoDN=$_SESSION['AnoDataNascimento'];}
?>
</span></div></td>
</tr>
<tr>
<td colspan='3'><table width='100%'>
<tr>
<th width='8%' scope='col'> </th>
<th width='38%' scope='col'><div align='right'><strong><a href='[http://www.site.com.br/proxpagina.php'](http://www.site.com.br/proxpagina.php) class='style1 style2' style='text-decoration:none'>
<input type='button' name='Voltar' value='Voltar' onclick='location.href = 'http://www.site.com.br/paganterior.php';' title='Clique aqui caso queira retornar e corrigir algum dado.' />
</a></strong></div></th>
<th width='7%' scope='col'><div align='right'></div></th>
<th width='39%' scope='col'> <div align='left'></div></th>
<th width='8%' scope='col'> <div align='left'> </div></th>
</tr>
</table></td>
</tr>
</table></td>
</form></tr>
</table>
</body>
</html>
"} else {
echo "Acesso não autenticado!";
}
?>Carregando comentários...