image display error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tolkienarda
    Contributor
    • Dec 2006
    • 316

    image display error

    hi all

    here is a realy simple tag i found and i am wondering what it is and why it works somtimes

    [HTML]
    <img src=?gim='home1 '>
    [/HTML]
    when i do this my $_REQUEST[gim] dosen't return any value but when i
    [HTML]
    <img src?gim=1>
    [/HTML]
    this returns a 1 in $_REQUEST[gim]

    if anyone can tell me what is going on here i would appreiate it

    eric
  • xwero
    New Member
    • Feb 2007
    • 99

    #2
    Originally posted by tolkienarda
    hi all

    here is a realy simple tag i found and i am wondering what it is and why it works somtimes

    [HTML]
    <img src=?gim='home1 '>
    [/HTML]
    when i do this my $_REQUEST[gim] dosen't return any value but when i
    [HTML]
    <img src?gim=1>
    [/HTML]
    this returns a 1 in $_REQUEST[gim]

    if anyone can tell me what is going on here i would appreiate it

    eric
    I think the ?gim part doesn't get processed by php. You just get the src attribute.

    In the first example you get no value because php sees gim='home1' as a new attribute. In html it's not wrong to add attributes that aren't part of the specifications. It's not a technique that is to be encouraged but browsers just look over those attributes.

    Comment

    Working...