🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #2477

Re: duda php (otra vez)

#2477
From: Yiyux
Date: Tue, 10 Jan 2006 23:00
64 lines
2419 bytes
Hector Vergara R. escribi�:
> 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"
>>
> 
> 
> 
la funcion empty() te puede servir tb mas que $_POST['rut']==""
ej:
$aux = $_POST['rut'];
if(empty($aux))
{
}

Saludos y arriba php !!!!
Technical Details
Message-ID: <dq1e7g$f7k$1@news.nivel5.cl>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.mbo.net!news.tdl.com!news.he.net!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!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.mbo.net!news.tdl.com!news.he.net!news.kjsl.com!news.nivel5.cl!not-for-mail
From: Yiyux <"kfw[at]"@softhome.net>
Newsgroups: chile.comp.programacion
Subject: Re: duda php (otra vez)
Date: Tue, 10 Jan 2006 20:00:38 -0300
Organization: Varios
Lines: 64
Message-ID: <dq1e7g$f7k$1@news.nivel5.cl>
References: <dn78p5$a2d$1@news.nivel5.cl> <dn7m50$fsn$1@news.nivel5.cl>
NNTP-Posting-Host: pc-73-216-104-200.cm.vtr.net
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: news.nivel5.cl 1136933936 15604 200.104.216.73 (10 Jan 2006 22:58:56 GMT)
X-Complaints-To: news@news.nivel5.cl
NNTP-Posting-Date: Tue, 10 Jan 2006 22:58:56 +0000 (UTC)
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: es-ar, es, en-us, en
In-Reply-To: <dn7m50$fsn$1@news.nivel5.cl>