Results 1 to 4 of 4

Thread: Inserting image inside the php code

  1. #1
    Join Date
    May 2008
    Posts
    248

    Inserting image inside the php code

    Hi
    Please check the following code, I do not get an error when I run it, but when I try to insert an image I get an error. Here is my code
    Code:
    if ($seo_on == 0)
    
    { echo "<div align='center'><a href='{$site_url}/index.php?task=viewnew'><img src="template/images/newest.png" border="0" />View More Newest Videos</a></div>"; }
    
    else
    
    { echo "<div align='center'><a href='{$site_url}/new.html'><img src="template/images/newest.png" border="0" />View More Newest Videos</a></div>"; }
    Please suggestion or any advice on this, how to fix it? thanks in advance.

  2. #2
    Join Date
    May 2008
    Posts
    2,012

    Re: Inserting image inside the php code

    Hi
    I read your code, the following should solve your problem. You have to just enclose the image src and border in a single quotes and the problem is solved. Check that out.
    Code:
    if ($seo_on == 0)
    {
    echo "<div align='center'><a href='{$site_url}/index.php?task=viewnew'><img src='template/images/newest.png' border='0' />View More Newest Videos</a></div>";
    }
    else
    {
    echo "<div align='center'><a href='{$site_url}/new.html'><img src='template/images/newest.png' border='0' />View More Newest Videos</a></div>";
    }
    Any more problem do post back. Feel free to post.

  3. #3
    Join Date
    May 2008
    Posts
    248

    Re: Inserting image inside the php code

    Hi
    Thanks for your reply and your code.
    Code:
    You have to just enclose the image src and border in a single quotes and the problem is solved. Check that out.
    Thanks for the part of the code. This has definitely solved the problem. It was a simple modification but I could not guess it.

  4. #4
    Join Date
    May 2008
    Posts
    2,012

    Re: Inserting image inside the php code

    Hi
    Pleased to hear that the problem is been solved. For just a suggestion, you can try Adobe Dreamweaver CS4 it is an Adobe product. It works great for php and editing them visual php. You can do this in just one single click. You can also fix the problem very quickly. This will help you for sure. Though, just an suggestion.

Similar Threads

  1. Getting random white Pixel inside Black image on Mozilla Firefox 6.0
    By gANdHAaIt in forum Technology & Internet
    Replies: 6
    Last Post: 25-08-2011, 10:30 AM
  2. How to add image inside the canvas using SilverLight
    By Hunter-Man in forum Windows Software
    Replies: 3
    Last Post: 17-04-2011, 06:51 PM
  3. Folder icons not showing small image inside it
    By Mast Maula in forum Operating Systems
    Replies: 3
    Last Post: 14-03-2011, 04:39 AM
  4. Inserting an image on mouse click
    By Ash maker in forum Software Development
    Replies: 5
    Last Post: 09-03-2010, 11:59 AM
  5. I need JAVA help code inside
    By Daren in forum Software Development
    Replies: 3
    Last Post: 23-05-2009, 06:58 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,726,527,815.61544 seconds with 17 queries