mikefrederick Posted October 4, 2007 Share Posted October 4, 2007 so I have this script, it uploads images to a folder and a title for the image to a database and I want to have a page that lists all Image w/ image title under it in a vertical row. It will looks like: Image "title" Image "title" I made the page and when there is only one image/title it looks fine but when i try to add more than one it does not work out right. in other words i need to add a space between each image and title. this is the relevant code that i have. the first part gets the image and the second gets the title: <img src="featuredimages/<? mysql_select_db($database_localhost, $localhost); $query_Rs = "SELECT * FROM featuredprop order by featurename"; $Rs = mysql_query($query_Rs, $localhost) or die(mysql_error()); $totalRows_Rs = mysql_num_rows($Rs); $OrFileName = $row_Rs['featuredprop']; while ($row_Rs = mysql_fetch_assoc($Rs))echo $row_Rs['featurename'];?>" height="100" width="100" > <br></div> <? mysql_select_db($database_localhost, $localhost); $query_Rs = "SELECT * FROM featuredprop order by featuredtitle"; $Rs = mysql_query($query_Rs, $localhost) or die(mysql_error()); $totalRows_Rs = mysql_num_rows($Rs); $OrFileName = $row_Rs['featuredprop']; while ($row_Rs = mysql_fetch_assoc($Rs))echo $row_Rs['featuredtitle'];?> can anyone help? Quote Link to comment Share on other sites More sharing options...
markjoe Posted October 4, 2007 Share Posted October 4, 2007 you could make the cell bigger than the image and center the image in the cell. or, you could use cellspacing or cellpadding. you could even add a cell between the image cells. Sounds like the issue is all in the HTML formatting. Quote Link to comment Share on other sites More sharing options...
mikefrederick Posted October 4, 2007 Author Share Posted October 4, 2007 Hey I am not looking to link to each file individually, that would be too easy, I am looking to make it so that when I upload a file the new image and titled is placed below the previous image/title. Quote Link to comment 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.