Hey i need help,
when a user logs in with thier email and password i want to get there first name and display Welcome "username" you are logged in.
on the web pages that the user has to loging to view how would i go about doing something like this...
Thanks in advance :)
Comments:
Mar 25, 2009
- so how would i go about doing the second option i know nearly nothing about sessions in php, i have a checklogin.php script to make sure the user is registered if users is registered then redirect them to XXXX.php would i grab the username at the same time as that it would help if i had a list like what to do and in what order the php scripts would do things in
you had not provided complete detail that if you are having database for username or you want to fetch username from 'email providing site' in which your user created his account.if you are trying for second option,It is almost not possible coz any of the email providing site will not exchange personal detail of any of his acc holder.
if you are trying first option,session in php can help you.you can store username in a session variable n then u can access them on any page if session is not destroyed or expired.
Comments:
Mar 26, 2009
- hi.if u r using form to take username n password,let the name of
username holding variable as 'user_name'.then just add two lines in
your checklogin.php
and then redirect the script to that page you want.whenever you need to
print user_name on any page just type again only two lines
session_start();
print $_SESSION["name"];
u can make any no. of session variables by changing variable name i.e.
"name" here n use them like above.no need to start session by "
start_session(); " on a single page.
"BEST OF LUCK n KEEP GOING"
I want to execute java command for a software which is stored on my web server with the help of...
(More)
I want to execute java command for a software which is stored on my web server with the help of command line but this should be executed through php... I have a code as follows,but its not working ,i need to integrate all exec commands. $cmd='cd C:Program FilesApache GroupApache2htdocsmainsphinxsphinx4-1.0beta-binsphinx4-1.0betain'; exec('C:WINNTsystem32cmd.exe'); exec($cmd); exec("java -mx312m -jar wav2text.jar voice_rec.wav>6.txt"); Reply fast>.
Hi there, I am using PHP5, where i need to mail with attachement. exact thing is, am getting the...
(More)
Hi there, I am using PHP5, where i need to mail with attachement. exact thing is, am getting the file in one page through basic input tag with file attribute. in next page am not getting the file path in order to mail it. Please help me.