Click to See Complete Forum and Search --> : rediraction


zuzupus
06-17-2003, 07:22 AM
how i can get the particular htmls when user submit the login page i mena to say redirect if users are apple,mango then page,html else mypage,html


<tr>
<td align="center">
<h1><span class="u">u s e r :</span><br />
<input size="20" maxlength="50" type="text" name="account" value="" class="big" /></h1>
<h1><span class="u">p a s s w o r d :</span><br />
<input size="20" maxlength="50" type="password" name="password" value="" class="big" /></h1>
<p><input type="submit" value="OK" class="biggray" /></p>
</td>
</tr>
and then for internal users it will get first figure else for external it will get fig.2

$query=select user from t_emp where intern='true'; //apple,mango

pyro
06-17-2003, 07:25 AM
As I said in your other post, you first need a <form> tag. Once you have that, set the action to a PHP page, and then you can either check if there input is true via a conditional statement, or with a more advanced database query, as it appears you are pulling values from a DB...

zuzupus
06-17-2003, 08:01 AM
<? if (!$session->login) send_location_die('login.phtml?error=true');
list($user) = once_query_array("SELECT user FROM t_user WHERE intern='t'");
if ($user== true) {
$loc = "mypage.php";
}
else {
$loc = "default.php";
}
?> still its not working as i created a cloumn called intern
and if its value is 't' then for internal and for external its 'f'
so now result is its showing always mypage.php for external also how to get default.php

my table is like that
t_user
user pwd intern
mango mgo t
apple app t
citrus cit f
coco cp f