Reply
Picture Managing/AViewing
Old 01-28-2005, 03:26 PM Picture Managing/AViewing
Average Talker

Posts: 29
I am trying to add image uploading for our current properties and easy to view image setup.

The closest thing to what I am looking for would be how ebay has their picture viewing setup, with the small pictures listed on a side and the main large one changes when you click on them. Woud this be a combo of php, mysql and javascript or something to that effect?

I would need a way to be able to upload any number of pictures for the homes and have them all returned, so for the returning of pictures I would imagine I could setup a script that migth look something like this:

PHP Code:
$result mysql_query("SELECT * FROM $property_table WHERE PropertyRef = '$_GET[PropertyRef]' LIMIT 1") or die ("Database Error 32"); 
$row mysql_fetch_array$result );
$PropertyImageURL $row['PropertyImageURL'];


if (empty(
$PropertyImageURL))  {print "<image src=\"$ImagePath/nopropertyimage.jpg\">";}

else { 
this is where I get lost 
What would be the best way to make this display these pictures?

And also, how do I upload multiple images for each property as well as simultaneously create a thumbnail of each one?

I know this could be very complicated, but any help would be greatly appreciated!

Thanks ahead of time,

Will
WDavis is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 01-29-2005, 07:32 AM
ACJavascript's Avatar
Humble Mod

Posts: 548
Location: CT, USA
Hey Davis,

Try this:

PHP Code:

$result 
mysql_query("SELECT * FROM $property_table WHERE PropertyRef = '$_GET[PropertyRef]' LIMIT 1") or die ("Database Error 32"); 

if (
mysql_num_rows($result)==0){print "<image src=\"$ImagePath/nopropertyimage.jpg\">";} 

else { 
$i=0;
while(
$row=mysql_fetch_array($result)){
$i++;
echo(
"Pic".$i."<BR>");

You can display the pictures whithin the WHILE loop.

As for adding multiple pictures you have to create two tables.
One to hold all your property info(propery id)
And the other one to hold all of your pictures.
You add the PROPERTY ID to the pictures table when adding a new image. You then call for the specified property ID and you will also recieve the images.
__________________
CYTech-services.com - 100 Satisfied Customers - Custom Programming and Web Development
ACJavascript is offline
Reply With Quote
View Public Profile Visit ACJavascript's homepage!
 
Old 02-02-2005, 11:10 AM
Average Talker

Posts: 29
The biggest problem I am having is trying to create this upload script to automatically rename the pictures to a numbered order and has unique name to only that property id - or create a new directory for each property with pic numbers starting at 0 or 1. What would the script look like?

I have been trying to come up with a script, but I just don't know the language well enough to figure out the commands.


I had figured that I was going to need to use a while loop, but I wasn't sure how to go about implementing it the way I needed. Is there a way to tile the returned pictures horizontally or something of the like?
WDavis is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Picture Managing/AViewing
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.32892 seconds with 13 queries