Ver Mensaje Individual
  #5 (permalink)  
Antiguo 08/01/2005, 10:04
Avatar de baklao
baklao
 
Fecha de Ingreso: noviembre-2004
Ubicación: Santa Ana - Isla de Margarita
Mensajes: 482
Antigüedad: 19 años, 4 meses
Puntos: 0
mmmmmm el error que te da es que esta una llave de mas }
aqui lo tienes correjido.
Código PHP:
<?php
$conexion 
mysql_connect("PET7777""root150""");
if (! 
$conexion)
{
echo 
"<h2 align='center'>ERROR: Imposible establecer conexión con el servidor</h2>";
exit;
}
mysql_select_db("datos"$conexion);
$sql mysql_query("SELECT * FROM usuario ORDER BY codigo ASC");
echo 
'<html>
<head>
<title>Consultando usuarios</title>
</head>
<body>
<table border="1" align="center" cellspacing="1" style="border-collapse: collapse" width="75%" id="table1">
<tr>
<td width="26%">
<p align="center"><font face="Arial" size="2"><b>Código de la Loteria</b></font></td>
<td width="32%">
<p align="center"><font face="Arial" size="2"><b>Nombre de la Loteria</b></font></td>
<td>
<p align="center"><b><font face="Arial" size="2">Activa</font></b></td>
<td colspan="4">
<p align="center"><b><font face="Arial" size="2">Acción</font></b></td>
</tr>
'
;
$color "#FFFFE1";
$cantidad=mysql_num_rows($sql);
while(
$row=mysql_fetch_array($sql)){
if (
$color == "#FFFFE1")
{
$color "#DBF0FB";
}
else
{
$color "#FFFFE1";
}
if (
$cantidad == 0)
{
echo 
'
<tr bgcolor="'
.$color.'">
<td width="26%">'
.$row[codigo].'</td>
<td width="32%">'
.$row[nombres].'</td>
<td width="56">'
.$row[apellidos].'</td>
<td width="24">
<a href="util.php?id='
.$row[codigo].'&action=insertar&tab=loteria">
<img border="0" alt="Insertar usuario" src="../image/Botones/b_insrow.png" width="16" height="16"></td>
<td width="21">
<img border="0" alt="Editar usuario" src="../image/Botones/b_insrow.png" width="16" height="16"></td>
<td width="23">
<img border="0" alt="Desactivar usuario" src="../image/Botones/b_drop.png" width="16" height="16"></td>
<td width="29"></td>
</tr>
'
;
}
else
{
echo 
'
<tr bgcolor="'
.$color.'">
<td width="26%">'
.$row[codigo].'</td>
<td width="32%">'
.$row[nombres].'</td>
<td width="56">'
.$row[apellidos].'</td>
<td width="25" align="center">
<a href="util.php?id='
.$row[codigo].'&action=insertar&tab=loteria">
<img border="0" alt="Insertar usuario" src="../image/Botones/b_insrow.png" width="16" height="16"></td>
<td width="26" align="center">
<a href="util.php?id='
.$row[codigo].'&action=editar&tab=loteria">
<img border="0" alt="Editar usuario" src="../image/Botones/b_edit.png" width="16" height="16"></td>
<td width="21" align="center">
<a href="ver.php?id='
.$row[codigo].'&action=ver&tab=loteria">
<img border="0" alt="Ver usuarios" src="../image/Botones/b_browse.png" width="16" height="16"></td>
<td width="28" align="center">
<a href="util.php?id='
.$row[codigo].'&action=eliminar&tab=loteria">
<img border="0" alt="Desactivar usuario" src="../image/Botones/b_drop.png" width="16" height="16"></td>
</tr>
'
;
}
if (
$color == "#FFFFE1")
{
$color "#DBF0FB";
}
else
{
$color "#FFFFE1";
}
echo 
'<tr bgcolor="'.$color.'">
<td width="26%"></td>
<td width="32%" align="center">
<input name=idclose type=button value="Cerrar" onclick="window.close()" style="border: 1px solid #000080">
</td>
<td width="4%"></td>
<td width="4%"></td>
<td width="4%"></td>
<td width="4%"></td>
<td width="4%">
</td>
</tr>
</table>
</body>
</html>
'
;
?>
Suerte y Salu2.

Bye
__________________
Atte. Mohamed :aplauso: