๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #2548

Re: duda php (otra vez)

#2548
From: Rickoj
Date: Thu, 08 Dec 2005 22:43
59 lines
2326 bytes
A Hector Vergara R. se le ocurrio tipear
> usa templates!!!!

la verdad no lo he probado, no me gustan mucho eso de usar template
me gusta mas escribir el codigo, pero los probare a ver que tal
gracias

> 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"

-- 
"Nadie puede quitarme el derecho
a ser un perfecto imbecil" 
Technical Details
Message-ID: <dnad0m$2tc$1@news.nivel5.cl>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!not-for-mail
References: <dn78p5$a2d$1@news.nivel5.cl> <dn7m50$fsn$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!news4.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: Re: duda php (otra vez)
Date: Thu, 8 Dec 2005 19:43:25 -0300
Organization: Varios
Lines: 61
Message-ID: <dnad0m$2tc$1@news.nivel5.cl>
References: <dn78p5$a2d$1@news.nivel5.cl> <dn7m50$fsn$1@news.nivel5.cl>
NNTP-Posting-Host: pc-115-201-120-200.cm.vtr.net
X-Trace: news.nivel5.cl 1134081878 2988 200.120.201.115 (8 Dec 2005 22:44:38 GMT)
X-Complaints-To: news@news.nivel5.cl
NNTP-Posting-Date: Thu, 8 Dec 2005 22:44:38 +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