offsprg01 Posted February 27, 2007 Share Posted February 27, 2007 well i finally got the stupid image uploader working, now i'm having a hell of a time getting the image to show up. here's my code to pull the filename from the db and place it in a var to be echoed later mysql_select_db($database_TestDB, $TestDB); $cdate = date ('Y-m-d'); $query_PromoLeftSelect = "SELECT * FROM PromoImages ORDER BY StartDate DESC Limit 1"; $PromoLeftSelect = mysql_query($query_PromoLeftSelect, $TestDB) or die(mysql_error()); $row_PromoLeftSelect = mysql_fetch_assoc($PromoLeftSelect); $totalRows_PromoLeftSelect = mysql_num_rows($PromoLeftSelect); $leftPromo = $row_PromoLeftSelect['FileName']; $query_PromoRightSelect = "SELECT * FROM PromoImages ORDER BY EndDate DESC Limit 1"; $PromoRightSelect = mysql_query($query_PromoRightSelect, $TestDB) or die(mysql_error()); $row_PromoRightSelect = mysql_fetch_assoc($PromoRightSelect); $totalRows_PromoRightSelect = mysql_num_rows($PromoRightSelect); $rightPromo = $row_PromoRightSelect['FileName']; this this is the code to put the image in the site... <img src="admin/uploads/<?php echo $leftPromo; ?>" alt="promo1" width="349" height="64" /> <img src="admin/uploads/<?php echo $rightPromo; ?>" alt="promo2" width="349" height="64" /> [code] here's a link to the file http://www.harwoodmarketinggroup.com/WIP/ [/code] Link to comment https://forums.phpfreaks.com/topic/40314-mysql-select-returns-the-right-filename-but-still-no-image/ Share on other sites More sharing options...
HaLo2FrEeEk Posted February 27, 2007 Share Posted February 27, 2007 I tlooks to me like the file simply isn't there, if it was there, it should be at this location on your server: http://www.harwoodmarketinggroup.com/WIP/uploads/promo1.jpg Check to see that the image is there. Link to comment https://forums.phpfreaks.com/topic/40314-mysql-select-returns-the-right-filename-but-still-no-image/#findComment-195038 Share on other sites More sharing options...
JasonLewis Posted February 27, 2007 Share Posted February 27, 2007 HaLo2FrEaEk the link is actually: http://www.harwoodmarketinggroup.com/WIP/admin/uploads/promo1.jpg and it does work, except it says permissions are denied. make sure the folder and file permissions are 755 or 777 i think. Link to comment https://forums.phpfreaks.com/topic/40314-mysql-select-returns-the-right-filename-but-still-no-image/#findComment-195044 Share on other sites More sharing options...
offsprg01 Posted February 27, 2007 Author Share Posted February 27, 2007 it's a permission problem. i changed the folder. problem solved Link to comment https://forums.phpfreaks.com/topic/40314-mysql-select-returns-the-right-filename-but-still-no-image/#findComment-195047 Share on other sites More sharing options...
HaLo2FrEeEk Posted March 15, 2007 Share Posted March 15, 2007 off, I'm glad you got it fixed, fear, I went to the site, right clicked where the image should have been and clicked properties and copied exactly what was in the URL value, don't try to tell me I got it wrong, it was right when I did it. I know what I'm doing, I've been doing computers for some years now. Link to comment https://forums.phpfreaks.com/topic/40314-mysql-select-returns-the-right-filename-but-still-no-image/#findComment-207738 Share on other sites More sharing options...
JasonLewis Posted March 15, 2007 Share Posted March 15, 2007 sorry about that then. no hard feelings. Link to comment https://forums.phpfreaks.com/topic/40314-mysql-select-returns-the-right-filename-but-still-no-image/#findComment-207907 Share on other sites More sharing options...
chrisuk Posted March 15, 2007 Share Posted March 15, 2007 off, I'm glad you got it fixed, fear, I went to the site, right clicked where the image should have been and clicked properties and copied exactly what was in the URL value, don't try to tell me I got it wrong, it was right when I did it. I know what I'm doing, I've been doing computers for some years now. lol no need to take it so personally.... you did miss the admin directory out of the link mind.... Link to comment https://forums.phpfreaks.com/topic/40314-mysql-select-returns-the-right-filename-but-still-no-image/#findComment-207925 Share on other sites More sharing options...
HaLo2FrEeEk Posted March 17, 2007 Share Posted March 17, 2007 No I didn't, it might be there now, but when I right cliked the image, I copied the url exactly as it was, I didn't retype it, I copied and pasted it, without editing, the admin directory was not in the url, I know what I'm doing. I'm sorry I took it personally, its just...computer people don't get much...recognition in the world, you know what I mean, and they are probably the smartest, or almost, out there, its frustrating to say the least. Link to comment https://forums.phpfreaks.com/topic/40314-mysql-select-returns-the-right-filename-but-still-no-image/#findComment-209332 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.