Jump to content

help w/ php


mikefrederick

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/71770-help-w-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.