Tema: Duda Codigo
Ver Mensaje Individual
  #5 (permalink)  
Antiguo 05/02/2011, 13:22
SonrisaCs
 
Fecha de Ingreso: diciembre-2010
Mensajes: 180
Antigüedad: 13 años, 4 meses
Puntos: 5
Respuesta: Duda Codigo

Aver, por ejemplo si quiero poner esta tabla...?

Código PHP:
Ver original
  1. <table align="right" bgcolor="#666666" style="float:right; margin-top:-34px;">
  2.  
  3.           <tr class="dropdown">
  4.  
  5.             <td align="right">Usuario:
  6.  
  7.               <input type="text" name="username" size=10></td>
  8.  
  9.             <td align="right">Password:
  10.  
  11.             <input type="password" name="password" size=10> </td>
  12.  
  13.             <td align="right"><input type="submit" value="Entrar" name="login"> </td>
  14.  
  15.             <td width=100 align="right"> <center><a href="register.php" title="Click here to join now!">
  16.  
  17.                 <img src="images/join.gif" border=0 onMouseOver="this.src='images/join1.png';" onMouseOut="this.src='images/join.gif';">
  18.  
  19.                 </a> </center>
  20.  
  21.         </table>

Seria

Código PHP:
Ver original
  1. <?php
  2.            
  3.            
  4.             if(isset($_SESSION["imagehost-user"]) && !empty($_SESSION["imagehost-user"])){
  5.            
  6.                        echo "<li class=\"Estilo4\"><a href=\"/account.php\">Mi Cuenta</a></li>";
  7.                   }
  8.                   else{
  9.                      echo "<table align="right" bgcolor="#666666" style="float:right; margin-top:-34px;">;
  10.  
  11.           <tr class="dropdown">
  12.  
  13.             <td align="right">Usuario:
  14.  
  15.               <input type="text" name="username" size=10></td>
  16.  
  17.             <td align="right">Password:
  18.  
  19.             <input type="password" name="password" size=10> </td>
  20.  
  21.             <td align="right"><input type="submit" value="Entrar" name="login"> </td>
  22.  
  23.             <td width=100 align="right"> <center><a href="register.php" title="Click here to join now!">
  24.  
  25.                 <img src="images/join.gif" border=0 onMouseOver="this.src='images/join1.png';" onMouseOut="this.src='images/join.gif';">
  26.  
  27.                 </a> </center>
  28.  
  29.         </table>";            
  30.              }
  31.      ?>

Y porque el punto y coma ";" y la ultima llave "}" se ponen rojos? Y el cierre de php "?>" No es rojo oscuro como tendria que serlo? :S

Cuando pongo esto en mi header.php me sale lo siguiente:
Parse error: syntax error, unexpected '<' in /home/ironpicc/public_html/header.php on line 578
Las lineas de error son:
Código PHP:
Ver original
  1. }
  2.                   else{
  3.                      echo "<table align="right" bgcolor="#666666" style="float:right; margin-top:-34px;">;
  4.  
  5.           <tr class="dropdown">