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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.