Database query


Hi all me again

ok short and sweet

Is there a way to retrieve data from my SQL for a certain row …
for just the user who log in to view his profiles?

im currently guessing along the lline of this code


<?php require_once('mysql_connect.php'); $query = "SELECT DB_First_name FROM members WHERE DB_USER={$_SESSION['username']}"; $result = mysql_query($query); while ($row = mysql_fetch_array($result,MYSQL_ASSOC)){ echo' '; } [/php] it is actally a page where after the user log in the first page he/she will see is his/her profiles That is why im am guessing along the line of using the SESSION what i hope to acheive is to display all of only his/her data and place it into a table the code above show no errors except it display nothing :-?


I presume you use sessions to allow a user to remain logged in? If so, something like that should work. In general, database developers usually allow an extra column in the user table, which indicates the user ID and use that as a row indicator.


Hi thanks for the reply

I kept tying … but dont seems to be able to get it … keep getting on a blank … would u mind pointing me to how to do it ?

i dont have the User Id col … if it is needed i will do it … but i cant get any ideas on the codes needed