View Full Version : Need a more efficient way to filter

11-14-2009, 07:31 PM
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.

11-15-2009, 12:09 AM
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)

<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
$query_Recordset4 = "SELECT * FROM table WHERE ID = $_GET['id']