🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #2538

duda php (otra vez)

#2538
From: Rickoj
Date: Wed, 07 Dec 2005 18:13
44 lines
1713 bytes
Como deberia mezclar php y html

tengo el siguiente caso
if (condicion)
{
codigo html
}
else
{
codigo html
}

si pongo el codigo html con echo o print me envia un error de  Parse error: 
parse error, unexpected T_STRING, expecting ',' or ';'

si lo pongo cerrando y abriendo los tags de php <? ?> me envia el error de 
misplaced else

tengo algo asi

if ( ($_POST['nombre']=="") )
 {
  print("Debe ingresar datos en nombre <br>");
  echo "<a href="ingreso_datos.php">Volver</a>";
    }
else
{
    if  ( ($_POST['rut']=="") )
     {
     print("Debe ingresar datos en nombre <br>");
     echo "<a href="ingreso_datos.php">Volver</a>";
      }
     else
     {
    ....
    ....
     }
}


se agradece la ayuda (sin retos :p)
-- 
"Nadie puede quitarme el derecho
a ser un perfecto imbecil" 
Technical Details
Message-ID: <dn78p5$a2d$1@news.nivel5.cl>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,6276fef940e6c824,start
X-Google-Attributes: gid1593cb,public
X-Google-Language: SPANISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!not-for-mail
From: "Rick_oj" <rick_oj@[sin-esto]tutopia.com>
Newsgroups: chile.comp.programacion
Subject: duda php (otra vez)
Date: Wed, 7 Dec 2005 15:13:55 -0300
Organization: Varios
Lines: 46
Message-ID: <dn78p5$a2d$1@news.nivel5.cl>
NNTP-Posting-Host: pc-115-201-120-200.cm.vtr.net
X-Trace: news.nivel5.cl 1133979237 10317 200.120.201.115 (7 Dec 2005 18:13:57 GMT)
X-Complaints-To: news@news.nivel5.cl
NNTP-Posting-Date: Wed, 7 Dec 2005 18:13:57 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original