bigmikey00 Posted December 4, 2010 Share Posted December 4, 2010 i am working on making this forum script i wanna allows users to upload a photo album and pictures i have everything in place including all the database info the problem is i need a page that is considered a static page lets say i use the following code in images.php <a href="view_images.php?=<?php echo $images_id; ?>"><?php echo $images_name; ?></a> this code should take me to that address but the layout is designed in view_images this is the code located in the view_albums page to load the picture from the link <IMG SRC="/images/<?php echo $images_id; ?>/<?php echo $images_name; ?>"> now im not getting the image it shows just the first one located in the database now i can change the img src line to any id number and name and it will work for that image only how can i make this work the right way please respond ASAP for this is for a client of mine Thanks in advance, Mike Quote Link to comment https://forums.phpfreaks.com/topic/220668-need-some-pointers/ Share on other sites More sharing options...
bateman Posted December 4, 2010 Share Posted December 4, 2010 That code there would work just fine, however, that's not the code your having issues with. It sounds like it's locked into the first image from the database. Are you trying to show just one image or a gallery? Quote Link to comment https://forums.phpfreaks.com/topic/220668-need-some-pointers/#findComment-1143013 Share on other sites More sharing options...
laffin Posted December 4, 2010 Share Posted December 4, 2010 u didnt assign a key: href="view_images.php?= should look more like: href="view_images.php?id= this way when using $_GET, u know which key/value pair to pull Quote Link to comment https://forums.phpfreaks.com/topic/220668-need-some-pointers/#findComment-1143045 Share on other sites More sharing options...
bigmikey00 Posted December 5, 2010 Author Share Posted December 5, 2010 here is my view_images.php please tell me what i am missing my images.php file is almost the same it pulls the list of images and displays them correctly in the right order but this one will not open the game. im stuck any help would be great $username="username"; $password="password"; $database="db_name"; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM images "; $result=mysql_query($query); $image_id=mysql_result($result,$i,"id"); $image_name=mysql_result($result,$i,"name"); $image_desc=mysql_result($result,$i,"description"); mysql_close(); Quote Link to comment https://forums.phpfreaks.com/topic/220668-need-some-pointers/#findComment-1143095 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.