473,378 Members | 1,321 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

failed to retrieve data?

hi....i am making a system using php. after user had register their account, they will be proceeded to menu.php page. I want this page to be able to retrieve the data that have been entered by user.

For example....

Name : <their name that they entered during registration>

Department : < user's department >

I had succeed to retrieve their name..but the problem is,other information could no be retrieve,such as phone number,position in company etc.


this is my coding.....


Expand|Select|Wrap|Line Numbers
  1. <?php
  2. session_start();
  3. if(isset($_SESSION ['username']))
  4. {
  5. ?>
  6. <html>
  7. <body>
  8. Hi, <?php echo $_SESSION['username']; ?> [<a href="logout.php">Logout</a>]
  9. <br><br>
  10. <?php echo    "SENARAI TUGAS HARIAN"; ?>
  11. <br><br>
  12. <?php echo $_SESSION['username']; ?> //success to retrieve
  13. <?php echo $_SESSION['position']; ?> //failed
  14. <?php echo $_SESSION['department']; ?> //failed
  15.  
  16. <br><br>
  17. <br><br>
  18. <br><br>
  19. <br><br>
  20. <br><br>
  21.  
  22. </body>
  23. </html>
  24. <?php
  25. }
  26. else{
  27. header("Location: login.php");
  28. }
  29. ?>
Dec 22 '11 #1
4 1702
Dormilich
8,658 Expert Mod 8TB
you probably didn’t write those (failing) data. we would need to see the cade, where you save the data to the session.
Dec 22 '11 #2
hi dormilich...thankz for informing me about the CODE tag....
you said that you would need to see the cade, where i save the data to the session.

do you mean the database?
Jan 4 '12 #3
Dormilich
8,658 Expert Mod 8TB
I mean the code where you save the data into the session. if you save the data into a database and not a session, then you obviously can’t get those data out of the session.
Jan 4 '12 #4
hello dormilich....tq so much...now i know why i can't retrieve those data.....coz i save it in database....it's my mistake.....
Jan 5 '12 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Miki | last post by:
Hi. I have a IIS server with php3 installed. I have SQL server database and data stored in unicode format (nvarchar fields). In header of my php I have the meta: <meta HTTP-EQUIV="content-type"...
4
by: Claudia Fong | last post by:
Hi, I have a form where I need to display the data of a department that stores in a access db. When I first load the form it will call a function name loaddata which will get the first...
1
by: funcSter | last post by:
I want to retrieve data from an Excel file like how I would with a database. I understand that I would have to use OLE DB. Somehow I think I cannot get the connection string right, as the bit of...
5
by: ggk517 | last post by:
We are trying to develop an Engineering application using PHP, Javascript with Informix as the back-end. Is it possible to retrieve data using Javascript but by accessing the Database. Say...
1
by: kmanjani | last post by:
hi, i have to retrieve data from 4 tables at a time...can anyone guide me in wrting a query for the same.. Ex:- i have four fields f1,f2,f3,f4 which i need to retrieve from four tables...
3
by: karthigaj | last post by:
Hi, Happy new Year... i need to retrieve the data from the web server which is developed using HTML and i need to process those data in c but i should not use any CGIs. Can anybody help me...
1
by: gudipati | last post by:
hi,i have one problem.actually we can retrieve data from access. what is my requirement is when i retrieve data from access i want to store in text areas. finely,we can store if they r textboxes...
0
by: lenniekuah | last post by:
Hi Friends, I need your help. Please help me. I am trying to retrieve data from Excel Spreadsheet to fill the DataGridView for display prior to updating SQL SERVER with individual DataGridView...
0
by: michael Tun | last post by:
How can I retrieve data from oracle package. OracleCommand command = new OracleCommand("STAFF_SELECT", connection); command.CommandType = CommandType.StoredProcedure; STAFF_SELECT is...
0
by: lenniekuah | last post by:
Hullo Good Guys, I need your help. Please help me. I am very surprise of this error message: Index was out of range. Must be non-negative and less thatnt he size of the collection. Parameter name...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.