28, May 2012

using access class to paginate results from a registered user. - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: using access class to paginate results from a registered user.
« previous next »
Pages: [1] Print

Author 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: Male
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: Male
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
Tags : php mysql databases Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: using access class to paginate results from a registered user.
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 10:56:32 am





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.