the apprentice webmaster Posted May 11, 2006 Share Posted May 11, 2006 hi guy i am trying to add a image to my home page , but it seems that i can't , down below is the index.php so can anyone tell me if i wanna insert an image , how should i go by thx [b]<?define('TEXT_MAIN', '');define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) { define('HEADING_TITLE', $breadcrumb->last()); define('TABLE_HEADING_IMAGE', ''); define('TABLE_HEADING_MODEL', 'Model'); define('TABLE_HEADING_PRODUCTS', 'Product Name'); define('TABLE_HEADING_MANUFACTURER', 'Manufacturer'); define('TABLE_HEADING_QUANTITY', 'Quantity'); define('TABLE_HEADING_PRICE', 'Price'); define('TABLE_HEADING_WEIGHT', 'Weight'); define('TABLE_HEADING_BUY_NOW', 'Buy Now'); define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.'); define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.'); define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: '); define('TEXT_SHOW', '<b>Show:</b>'); define('TEXT_BUY', 'Buy 1 \''); define('TEXT_NOW', '\' now'); define('TEXT_ALL_CATEGORIES', 'All Categories'); define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');} elseif ($category_depth == 'top') { define('HEADING_TITLE', 'Welcome');} elseif ($category_depth == 'nested') { define('HEADING_TITLE', $breadcrumb->last() . ' ' . '');}?>[/b] Quote Link to comment https://forums.phpfreaks.com/topic/9528-can-anyone-help/ Share on other sites More sharing options...
Barand Posted May 11, 2006 Share Posted May 11, 2006 Use HTML IMG tag[a href=\"http://www.w3schools.com/html/html_images.asp\" target=\"_blank\"]http://www.w3schools.com/html/html_images.asp[/a] Quote Link to comment https://forums.phpfreaks.com/topic/9528-can-anyone-help/#findComment-35180 Share on other sites More sharing options...
the apprentice webmaster Posted May 11, 2006 Author Share Posted May 11, 2006 [!--quoteo(post=373200:date=May 11 2006, 03:09 AM:name=Barand)--][div class=\'quotetop\']QUOTE(Barand @ May 11 2006, 03:09 AM) [snapback]373200[/snapback][/div][div class=\'quotemain\'][!--quotec--]Use HTML IMG tag[a href=\"http://www.w3schools.com/html/html_images.asp\" target=\"_blank\"]http://www.w3schools.com/html/html_images.asp[/a][/quote]thx , for ur reply , can u be more precise i am newbee thx Quote Link to comment https://forums.phpfreaks.com/topic/9528-can-anyone-help/#findComment-35181 Share on other sites More sharing options...
.josh Posted May 11, 2006 Share Posted May 11, 2006 no offense man, but if you don't understand html, then why are you even trying to tackle php stuff? html is like, an afterthought.<img src="blah.jpg" width="100" height="100"> Quote Link to comment https://forums.phpfreaks.com/topic/9528-can-anyone-help/#findComment-35186 Share on other sites More sharing options...
the apprentice webmaster Posted May 11, 2006 Author Share Posted May 11, 2006 [!--quoteo(post=373206:date=May 11 2006, 03:27 AM:name=Crayon Violent)--][div class=\'quotetop\']QUOTE(Crayon Violent @ May 11 2006, 03:27 AM) [snapback]373206[/snapback][/div][div class=\'quotemain\'][!--quotec--]no offense man, but if you don't understand html, then why are you even trying to tackle php stuff? html is like, an afterthought.<img src="blah.jpg" width="100" height="100">[/quote]oh ok , so sorry , i got it now , i have tried that but the image doesn't appear , all i get is the alt text that 's all , why is that guys ? Quote Link to comment https://forums.phpfreaks.com/topic/9528-can-anyone-help/#findComment-35189 Share on other sites More sharing options...
.josh Posted May 11, 2006 Share Posted May 11, 2006 probably because you mispelled the image name, or else the image does not exist in the directory you have it in. for instance, if you simply put src="blah.jpg" but blah.jpg is in fact in ../images/blah.jpg well you need to make sure the path is correct.src="../images/blah.jpg"it depends on where the script is, versus where the image is. Quote Link to comment https://forums.phpfreaks.com/topic/9528-can-anyone-help/#findComment-35191 Share on other sites More sharing options...
the apprentice webmaster Posted May 11, 2006 Author Share Posted May 11, 2006 [!--quoteo(post=373211:date=May 11 2006, 03:37 AM:name=Crayon Violent)--][div class=\'quotetop\']QUOTE(Crayon Violent @ May 11 2006, 03:37 AM) [snapback]373211[/snapback][/div][div class=\'quotemain\'][!--quotec--]probably because you mispelled the image name, or else the image does not exist in the directory you have it in. for instance, if you simply put src="blah.jpg" but blah.jpg is in fact in ../images/blah.jpg well you need to make sure the path is correct.src="../images/blah.jpg"it depends on where the script is, versus where the image is.[/quote]i added it like this :define('TEXT_MAIN', '<img src="images/header.gif" alt="header" />');and the result is this : header why is that guys , thx once again Quote Link to comment https://forums.phpfreaks.com/topic/9528-can-anyone-help/#findComment-35195 Share on other sites More sharing options...
.josh Posted May 11, 2006 Share Posted May 11, 2006 put your define(..) back to the way it was. do not touch the php code. if all you want to do is display a static image on your web page and that's it, then you have no business touching the php code. all you have to do is this:<img src="images/header.gif" alt="header">just put that on its very own line somewhere, not inside the <? ... ?> tags. if you put it inside those two tags then put it like this (on it's OWN LINE):echo "<img src='images/header.gif' alt='header'>";if you still don't understand, then I'm sorry, I just don't know how else to explain it. Quote Link to comment https://forums.phpfreaks.com/topic/9528-can-anyone-help/#findComment-35199 Share on other sites More sharing options...
the apprentice webmaster Posted May 11, 2006 Author Share Posted May 11, 2006 [!--quoteo(post=373219:date=May 11 2006, 04:16 AM:name=Crayon Violent)--][div class=\'quotetop\']QUOTE(Crayon Violent @ May 11 2006, 04:16 AM) [snapback]373219[/snapback][/div][div class=\'quotemain\'][!--quotec--]put your define(..) back to the way it was. do not touch the php code. if all you want to do is display a static image on your web page and that's it, then you have no business touching the php code. all you have to do is this:<img src="images/header.gif" alt="header">just put that on its very own line somewhere, not inside the <? ... ?> tags. if you put it inside those two tags then put it like this (on it's OWN LINE):echo "<img src='images/header.gif' alt='header'>";if you still don't understand, then I'm sorry, I just don't know how else to explain it.[/quote]thx alot Crayon Violent , thx a million Quote Link to comment https://forums.phpfreaks.com/topic/9528-can-anyone-help/#findComment-35200 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.