Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

wolfphw

Erro estranho... naum sei pq...

Recommended Posts

Tipo naum to entendendo o pq estah dando esse erro...

 

Parse error: parse error in c:\apache\htdocs\dgti\site\adm\orgao_setor\adm_edit.php on line 103

 

Olhem meu código abaixo...

 

 

PHP

[*]<?php

[*] include("../../../conexao.php");

[*] include("valida.php");

[*]

[*] if ($log_nivel != 'adm') {

[*] header ("Location: ../index.php");

[*] }

[*]

[*] include("../style.php");

[*]

[*] $id_setor = $_GET[cod];

[*] $sql = mysql_query("SELECT * FROM ap_orgao_setor WHERE id_setor = '$id_setor'");

[*]

[*] while ($resultado = mysql_fetch_array($sql)) {

[*] $aux[0] = $resultado["id_setor"];

[*] $aux[1] = $resultado["id_orgao"];

[*] $aux[2] = $resultado["setor"];

[*] $aux[3] = $resultado["sigla"];

[*] }

[*]?>

[*]<html>

[*]<head>

[*]<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

[*]<title>:: Inventário de Aplicações ::</title>

[*]<style type="text/css">

[*]<!--

[*]body {

[*] margin-left: 5px; margin-top: 5px; margin-right: 0px; margin-bottom: 0px;

[*]}

[*].style1 {

[*] font-size: 14px; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold;

[*]}

[*].style2 {

[*] font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif;

[*]}

[*].style3 {

[*] font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold;

[*]}

[*].style4 {color: #FF0000}

[*]-->

[*]</style></head>

[*]

[*]<body>

[*]<table width="400" border="0" cellspacing="0" cellpadding="1">

[*] <tr>

[*] <td bgcolor="#000066"><table width="100%" border="0" cellpadding="1" cellspacing="0" bgcolor="#FFFFFF">

[*] <tr>

[*] <td align="center"><table width="99%" border="0" cellspacing="0" cellpadding="1">

[*] <tr>

[*] <td height="25"><span class="style1">Alterando Setor de Orgão </span></td>

[*] </tr>

[*] <tr>

[*] <td height="1" bgcolor="#CCCCCC"></td>

[*] </tr>

[*] <tr>

[*] <td height="22"><span class="style3">Código: <span class="style4"><?php echo $aux[0]?></span> </span></td>

[*] </tr>

[*] <tr>

[*] <td><form name="form1" method="post" action="adm_edit_ok.php">

[*] <table width="100%" border="0" cellspacing="1" cellpadding="1">

[*] <tr>

[*] <td width="35%"><div align="right"><span class="style2">Setor: </span></div></td>

[*] <td width="65%"><input name="setor" type="text" id="setor" value="<?php echo $aux[2]; ?>" size="30" maxlength="150"></td>

[*] </tr>

[*] <tr>

[*] <td class="style2"><div align="right">Sigla:</div></td>

[*] <td><input name="sigla" type="text" id="sigla" value="<?php echo $aux[3]; ?>" size="30" maxlength="150"></td>

[*] </tr>

[*] <tr>

[*] <td class="style2"><div align="right">Orgão:</div></td>

[*] <td>

[*] <select name="orgao" id="orgao">

[*] <?php

[*] $sql_orgao = mysql_query("SELECT id_orgao, sigla FROM ap_orgao ORDER BY sigla");

[*] while ($aux_orgao = mysql_fetch_array($sql_orgao)) {

[*] ?>

[*] <option value="<?php echo $aux_orgao["id_orgao"]?><?php if ($aux_orgao["id_orgao"] == $aux[0]) {echo "selected"?>><?php echo $aux_orgao["sigla"]?></option>

[*] <?php

[*] }

[*] ?>

[*] </select></td>

[*] </tr>

[*] <tr>

[*] <td> </td>

[*] <td><input name="id_setor" type="hidden" id="id_setor" value="<?php echo $aux[0]; ?>"></td>

[*] </tr>

[*] <tr>

[*] <td colspan="2"><div align="center">

[*] <input type="submit" name="Submit" value="Alterar" class="butadm">

[*]    

[*] <input type="submit" value="Cancelar" onclick="java script: self.close();" class="butadm">

[*] </div></td>

[*] </tr>

[*] </table>

[*] </form></td>

[*] </tr>

[*] </table></td>

[*] </tr>

[*] </table></td>

[*] </tr>

[*]</table>

[*]</body>

[*]</html>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Oke eu mais acho estranho, eh que essa linha que esta dando o erro eh no comando </html>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Começando da linha 73, veja se funciona trocando por:

 

<?php$sql_orgao = mysql_query("SELECT id_orgao, sigla FROM ap_orgao ORDER BY sigla");while ($aux_orgao = mysql_fetch_array($sql_orgao)) {?><option value="<?php echo $aux_orgao["id_orgao"]; ?>" <?php if ($aux_orgao["id_orgao"] == $aux[0]) echo "selected"; ?>><?php echo $aux_orgao["sigla"]; ?></option><?php}?>

Você esqueceu o } do if (é o que parece).

 

[]'s

Compartilhar este post


Link para o post
Compartilhar em outros sites

Putz, certamente vai ser isso....Que eu me lembro uma vez no ASP tb tava dando um problema igual e naum me lembrava como eu tinah resolvido... soh me lembrava que era uma cosia bem banal hehehe...Agora que você me lembrou que tah falntando o } era isso mesmo que tava faltando no meu erro do ASp tb a uns tempos atras hehehe...Valeu...

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.