Topic: using access class to paginate results from a registered user. (Read 1332 times)
Kill the googlebot
Posts: 6
44 credits Members referred : 0
« on: May 07, 2006, 09:37:18 pm »
Hi Olaf,
first of all thanks for sharing your knowledge with us, I'm newbie on php and mysql and your scripts are perfect to learn. let me know someting, if someone is logged in, can I use their information on my page?
as an example can I set variables and thus be used to paginate results, from a user located on a mysql table, in a protected page?
variables like: login name: $login or password: $password
thank you. sebastian
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #1 on: May 07, 2006, 09:48:12 pm »
Hello,
I think you're talking about two things, or is there a result page for each user?
Kill the googlebot
Posts: 6
44 credits Members referred : 0
« Reply #2 on: May 07, 2006, 10:54:07 pm »
Hi,
thanks for your reply. as an example, if user xxx log in on the website i want in page ex. results.php to show (from a mysql table) all the records that contain information about that user. I want to use the username or something similar from the login to insert on that page, results.php looking forward to show information contained from that users using a sentences like $SQL="SELECT * FROM results WHERE userid LIKE '%"$userlogin"%' ORDER BY price";
probably I'm wrong, but if I put the same information on a mysql table matching usernames this will be shown on the page. ex mysql table.. userid - product - description - price - discount
best regards sebastian
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #3 on: May 07, 2006, 11:34:50 pm »
Of course why not...
remember the login name is unique inside the login application. Just add a column to your results database table and continue like you posted before.
If the the user is logged the script has access to the session variable from the the user
Code:
$_SESSION['user']
Kill the googlebot
Posts: 6
44 credits Members referred : 0
« Reply #4 on: May 08, 2006, 10:31:43 pm »
thank you, I will do that. best regards sebastian
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=2439