Ver Mensaje Individual
  #3 (permalink)  
Antiguo 29/05/2009, 17:08
damiann
 
Fecha de Ingreso: febrero-2009
Ubicación: Luján, Argentina
Mensajes: 32
Antigüedad: 16 años
Puntos: 0
Respuesta: Problema con IF()

Ok, gracias por la rapida respuesta aca te dejo el codigo


Código PHP:
<?
{$tipocuenta="Select SCFIsVip,Expired,SCFVipMoney from MEMB_INFO where MEMB___ID='$_SESSION[user]' AND MEMB__PWD='$_SESSION[pass]'";
             
$result $db->Execute($tipocuenta);
             
$row $result->fetchrow();}
                      if(
$row[0] == 0){ $row[0] ='Normal';
                             }
                     if(
$row[0] == 1){ $row[0] ='VIP';
                             }
                     if(
$row[2] == 0){ $row[2] ='Sos pobre.xD';
                             }
if ((isset(
$_SESSION['pass'])) && (isset($_SESSION['user'])))
{
echo 
"<form action='' method='post' name='logout_account' id='logout_account'>
<table width='150' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td scope='row' class='text_login' align='left'><font color=#cd8162><B>Bienvenido <font color=red><B> $_SESSION[user]
  <input name='logoutaccount' type='hidden' id='logoutaccount' value='logoutaccount'></td>
</tr>
<tr>
<th height='16' scope='row'><div align='left' title='&Ecirc;&icirc;&igrave;&ograve;&eth;&icirc;&euml; &Iuml;&agrave;&iacute;&aring;&euml;' class='link_menu'>
  <p><a href='index.php?op=user'>Panel de Control <br>
  </a>Cuenta:$row[0]<br>;"
if($row[0] == 'VIP')
{
  echo 
"Vence: $row[1]<br>";
}
else
{}
echo 
"Creditos: $row[2]</p>
  </div></th>
</tr>
<tr>
  <th height='17' scope='row'><input name='Logout!' type='submit' class='button' id='Logout!' title='Log Out' value='Salir!'></th>
</tr>
</table>
</form>"
;}
else
{
echo 
"<form action='' method='post' name='login_account' id='login_account'>.......
Quizá alla muchos errores, es que es uno de mis primeros trabajos.