/    Sign up×
Community /Pin to ProfileBookmark

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

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@pyroJun 17.2003 — 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...
Copy linkTweet thisAlerts:
@zuzupusauthorJun 17.2003 — <? 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
×

Success!

Help @zuzupus spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...