Jump to content


Photo

can anyone help


  • Please log in to reply
8 replies to this topic

#1 the apprentice webmaster

the apprentice webmaster
  • Members
  • PipPipPip
  • Advanced Member
  • 65 posts

Posted 11 May 2006 - 06:48 AM


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



<?
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() . '&nbsp;' . '');
}
?>


#2 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,021 posts

Posted 11 May 2006 - 07:09 AM

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]
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#3 the apprentice webmaster

the apprentice webmaster
  • Members
  • PipPipPip
  • Advanced Member
  • 65 posts

Posted 11 May 2006 - 07:16 AM

[!--quoteo(post=373200:date=May 11 2006, 03:09 AM:name=Barand)--][div class=\'quotetop\']QUOTE(Barand @ May 11 2006, 03:09 AM) View Post[/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

#4 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 11 May 2006 - 07:27 AM

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">


Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#5 the apprentice webmaster

the apprentice webmaster
  • Members
  • PipPipPip
  • Advanced Member
  • 65 posts

Posted 11 May 2006 - 07:33 AM

[!--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) View Post[/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 ?

#6 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 11 May 2006 - 07:37 AM

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.
Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#7 the apprentice webmaster

the apprentice webmaster
  • Members
  • PipPipPip
  • Advanced Member
  • 65 posts

Posted 11 May 2006 - 07:48 AM

[!--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) View Post[/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

#8 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 11 May 2006 - 08:16 AM

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.

Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#9 the apprentice webmaster

the apprentice webmaster
  • Members
  • PipPipPip
  • Advanced Member
  • 65 posts

Posted 11 May 2006 - 08:19 AM

[!--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) View Post[/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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users