Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development

Application Development Dev Lounge for the Coder Folks



Reply
 
LinkBack Thread Tools
Old February 1st, 2012, 09:28 AM   #1 (permalink)
Junior Member
 
Join Date: Dec 2011
Location: chennai
Posts: 61
 
Device(s):
Thanks: 1
Thanked 0 Times in 0 Posts
Default display firstname and lastname after login success

Hi...
am developed one login form ...worked dis site http://webdesignergeeks.com/mobile/android/android-login-authentication-with-remote-db/#comment-1242....Here username and password post from mysql database...same coding only am used...its successfully worked for me...But now i like to do its redirect to next activity...dis next activity having logged user firstname and lastname displayed...

In database having more number of admin user...all admin user r logged in my login page…that means all admin users having permission… so i wrote adding query in login.php file...the query is
$query = "SELECT firstname,lastname FROM customers WHERE login = '$un' AND password = '$pw' AND usertype ='A'";

so here all admin user firstname and lastname displayed…but i need which admin person loged in login page that particular person firstname and lastname only displayed…

so plz give me some solutions…(i.e)krishnaveni,kannan,hariprasad r admin user means when krishnaveni loged means krishnaveni firstname and lastname ly displayed…kannan logged means kannan details only displayed..i dono how it is do???? plz give me best solutions….thanks in advance…
someone told to me...This is really easy save the logged in username in a global variable or preferences or extras in the activity.Then get it in the next activity and query again the database with this username. that’s all.
check Global variables in ANDROID...... | Coderz Heaven for setting the global variable and for http://coderzheaven.com/2011/03/passing-data-between-intents-in-android/


also i tried...but i can't ....so plz give me some solutions...and where is inserting and modifying my code...thanks in advance...



krishnaveni is offline  
Reply With Quote
Sponsors
Reply

Bookmarks


Go Back   Android Forums > Android Development > Application Development User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 12:12 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo