I assume you mean the 1052367746 portion of that URL? Am I right? If so: $id = basename($photoid, ".jpg"); That would work, I think, if you just wanted the numeric portion of the path. Not sure if this is what you want. -- Peter Ellis - pellis@xxxxxxxxxxxxxxx Web Design and Development Consultant naturalaxis | http://www.naturalaxis.com/ On Wed, 2004-08-18 at 19:55 -0400, Vern wrote: > I have a bunch of thumbnails that are pulled from a recordset based on a > user profile. > Each thumbnail opens the picture into another page so that the picture is > larger and I want to now have that user's pictures accessible by clicking a > previous and/or next arrow. > > The first recordset of thumbnails is retrieved by a URL link > ($HTTP_GET_VARS['id']) which is the user's ID number. > Click on one of the thumbnails a new page is open that display the larger > photo, but only that photo. I can of course pass along the user's ID as well > > mypage.php?photoID=uploads/1052367746.jpg&userID=215 > > which of course will allow me to create a new recordset based on the user's > id > > SELECT * > FROM penpals_photos > WHERE penpals_photos.filename = $photoID > > but how do I point the database first record at the photoID so that I can > use the next and previous options to see the next/previous picture? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php