php image

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
steveoroach
Forum Newbie
Posts: 2
Joined: Fri Jul 25, 2008 3:17 pm

php image

Post by steveoroach »

<a href="<?php echo JRoute::_( 'index.php?option=com_user&view=remind' ); ?>"><?php echo JText::_(''); ?></a> I'm trying to use an image for a link. Ive tried using <a href="<?php echo JRoute::_( 'index.php?option=com_user&view=remind' ); ?>"><img scr="file path"></a> and it doesn't work. Is there a correct way. I wouldn't have to do this if spanish characters displayed right
User avatar
omniuni
Forum Regular
Posts: 738
Joined: Tue Jul 15, 2008 10:50 pm
Location: Carolina, USA

Re: php image

Post by omniuni »

To use an image for a link, you need to put <img src="Path_to_File.jpg">

If you want this to display on a condition, for example if "view=remind"

Code: Select all

 
<?php
 
if($_GET['view'] == "remind"){
  echo '
   <img src="path_to_image">
   ';
}
 
?>
 
Post Reply