| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
I like Iced Tea
|
From database to browser
PHP Code:
I followed this whole thing from a tutorial. But first of all, it doesnt seem like this code takes the First name and Last name from a specific person ("SELECT * FROM $tbl_name WHERE username=$username_in_session and password=$password_in_session") Never the less this code isnt working for me :S I stored inputted username and password into session and now i just need it to connect to the database, find where it has that username and password, and so that it outputs the customer information on the page. Could some one help me out Thanks. Any help is welcome! |
|
|
|
|
|
#4 (permalink) |
|
I like Iced Tea
|
Ya. I had that, but now how can take data from the database and put it somewhere onto the page. Like when i save a session and go to the next page i can put <?php echo $_SESSION["username"]; ?> somewhere and then the username will appear. Is there something that is same concept but with database information? and once i have retrieved the data from the database, what else do i need? |
|
|
|
#9 (permalink) |
|
Spare Parts
Join Date: Jan 2005
Location: Bracknell Forest
Posts: 4,931
|
Code:
|
|
|
|
#10 (permalink) |
|
shiro
Join Date: Aug 2007
Location: Yokohama, Japan
Posts: 2,545
|
You don't need to use 'like' for strings - they will work fine with equal signs, and when you are doing username and password, it could potentially run into problems as it may return information for names and passwords that are like ones in the database when they aren't exact. With usernames and passwords, you want something to be exact! |
|
|
|
#11 (permalink) |
|
I like Iced Tea
|
PHP Code:
This is my PHP. what is wrong with it? its not outputting any first name or lastname |
|
![]() |