why cant img tag pick up a .php src

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Daniel King
    New Member
    • Oct 2010
    • 1

    #1

    why cant img tag pick up a .php src

    i wrote a script like this

    <img src="picview.ph p?picid=<?=$ids ?>"> but it wont go to this file..... note the php variable has already been declared....the picview.php contains my php script to receive value from the url and return an image, ok i decided to cause an error on this page to see if actually it comes there but nothing, so pls what do i do
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Does the output look like it should? By that I mean, if you look at the HTML in the browser, does the <img src="picview.ph p?picid=<?=$ids ?>"> tag look right? Is the <?=$ids?> replaced with the expected value?

    If you go directly to the picview.php?pic id=1 URL (replacing the 1 with a real value) does it show the picture like it is supposed to? The <img> tag expects and image, and nothing but an image. If there are errors or warnings in there, it won't show properly.

    If you show us the relevant parts of your code, we can take a look and see if we can spot any problems.

    P.S.
    The syntax <?=$ids?> is only valid on servers that have enabled the short_tags directive. It is not enabled by default. You are usually better of using the <?php echo $ids; ?> syntax. That one will work on all PHP servers.

    Comment

    Working...