From: Victor Saldaña D.
(
vsaldana_listas(EN)yahoo.es)
Date: Wed Jun 23 2004 - 01:05:01 CEST
Hola:
Necesito hacer q un formulario de ingreso cambie a un menu para
el usuario si el
login es correcto. Para esto estoy usando smarty 2.6.3 y pensaba
utilizar el if
q smarty me ofrece en los templates.
Cree la variable $_SESSION['loginok] para guardar si el usuario
esta autorizado
o no y se la pase al template con:
$smarty->assign("LOGINOK", $_SESSION['loginok']);
en la planilla puse el siguiente codigo:
{if
$LOGINOK == "yes"}
<b>:.:MENU
:.:</b><br />
<a
href='./kko_main/kko_newpost.php'>Nuevo
Post</a><br />
<a
href='./kko_main/kko_editpost.php'>Editar
Post</a><br />
<a
href='./kko_main/kko_erasepost.php'>Borrar
Post</a><br />
{else}
<b>:.:
LOGIN :.:</b><br />
<form
method="post"
action="./kko_main/kko_process.php">
<input
type="hidden" name="proceso"
value="2">
<input
type="text" name="userid"
size="15">Username<br><br>
<input
type="password" name="pass"
size="15">Password<br><br>
<input
type="submit" value="Log in">
</form>
{/if}
En definitiva no funciona, luego de la pantalla q muestra un
acceso exitoso
vuelve al form cuando deberia hacerlo al menu.
La verdad ya estoy un poco mareado buscandole solucion, si
alguno de ustemes me
puede orientar se lo agradesco desde ya.
salu2!
-- PHP Spanish Localization Talk Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
This archive was generated by hypermail 2.1.7 : Tue Sep 21 2004 - 21:34:42 CEST