๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #2546

Re: duda php (otra vez)

#2546
From: Hector Vergara R.
Date: Thu, 08 Dec 2005 01:02
51 lines
1995 bytes
usa templates!!!!

smarty, phplib, fasttemplate, etc, etc,etc....

"Rick_oj" <rick_oj@[sin-esto]tutopia.com> escribi๏ฟฝ en el mensaje 
news:dn78p5$a2d$1@news.nivel5.cl...
> 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: <dn7m50$fsn$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
References: <dn78p5$a2d$1@news.nivel5.cl>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,6276fef940e6c824
X-Google-Attributes: gid1593cb,public
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!not-for-mail
From: "Hector Vergara R." <hvergara@nospam.gmail.com>
Newsgroups: chile.comp.programacion
Subject: Re: duda php (otra vez)
Date: Wed, 7 Dec 2005 22:02:08 -0300
Organization: Varios
Lines: 53
Message-ID: <dn7m50$fsn$1@news.nivel5.cl>
References: <dn78p5$a2d$1@news.nivel5.cl>
NNTP-Posting-Host: pc-75-16-83-200.cm.vtr.net
X-Trace: news.nivel5.cl 1133992928 16279 200.83.16.75 (7 Dec 2005 22:02:08 GMT)
X-Complaints-To: news@news.nivel5.cl
NNTP-Posting-Date: Wed, 7 Dec 2005 22:02:08 +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; Response