logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > PHP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 11-14-2009, 07:31 PM   #1
woofy
woofy's Avatar
 
Join Date: Dec 2007
Location: San Diego
Posts: 57
Default Need a more efficient way to filter

I have about 300 user pages and I want to create more, the problem is when filtering the username, stats, etc. the way I have been doing it is by creating a recordset query where I filter using their unique user ID as a entered value. So I have to manually enter in the code their user ID and save each page individually. The code looks like this

$query_Recordset4 = "SELECT * FROM uploads WHERE ID = '6'

It works but I would rather not have to go and every page I make enter the value manually as I plan on getting many more users in the future. I can't use a session variable either because I want other members to be able to look at others pages, if I use a session variable it shows the pages of the user logged on. What other options do I have, form variable... I'm lost or do I just have to manually enter the value in all of the pages.
woofy is offline   Reply With Quote
Old 11-15-2009, 12:09 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,204
Default

i would aproach this by each member having their own page based on sessions. as for seeing other members page if you loop throue the members your record set counld be fasioned to display nenbers as a link so (roughly)
Code:
 
 
<a href="profile_page.php?id="<?php $resordset['id'] ;?>" /> =<?php echo $resordset['name'] ;?></a>
each members id will be passsed to the profile page as $_GET['id']
then make your profile page select
Code:
$query_Recordset4 = "SELECT * FROM table WHERE ID = $_GET['id']
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:39 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com