Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Dec 2003
    Location
    texas
    Posts
    96
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation Can someone tell me how this is not displaying any output?

    I have a website that I have design that is suppose to pull information out of a database. Well when someone clicks on a link it is suppose to change the content of the website. Inside of the database in a table called Land_Pictures is this...
    <form action="home.com/index.php" method="get" name="picture1">
    <? $img=1.jpg ?>
    <a href="" onClick="window.open('image.php?id=<?echo $img;?>', 'win1', 'width=300,height=350')">
    <img src="<?echo $img;?>.jpg" height="221" width="200" border="0">
    <form>

    Well this is the same code that I have to work with other pictures. I also have other buttons that display other information from the database, so I know it is not my connection string or anything, but what this does is just show sort of an image place holder, but any help would be greatly appreciated...thanks

    Brian
    thanks
    bri

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,084
    Thanks
    11
    Thanked 100 Times in 98 Posts
    <? $img=1.jpg ?>
    should be
    <? $img="1.jpg"; ?>

    And I am guessing this is wrong unless your image is called '1.jpg.jpg'
    <img src="<?echo $img;?>.jpg" height="221" width="200" border="0">

    you are also missing a trailing </a> and I am unsure what the form is doing there ?
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    New Coder
    Join Date
    Dec 2003
    Location
    texas
    Posts
    96
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I ended up taking the form out, but what the form did was return it back to the main window...this works sort of like a pop up but I did was take the $img="1.jpg? and make it equal just 1
    Now the image place holder is still there, but when I go and look at the properties on that image it gives me this as the location, if that helps any...
    http://cypresspointonrayburn.com/%3C?echo%20$img;?%3E.jpg
    now my code reads this
    <? $img="1"; ?><a href="" onClick="window.open('image.php?id=<?echo $img;?>', 'win1', 'width=300,height=350')"><img src="<?echo $img;?>.jpg" height="221" width="200" border="0"></a>
    thanks
    bri

  • #4
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,084
    Thanks
    11
    Thanked 100 Times in 98 Posts
    well I just checked your site and it appears to be working now ? /index.php at least
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •