...

View Full Version : Can someone tell me how this is not displaying any output?



briintex1
10-11-2004, 02:49 AM
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

firepages
10-11-2004, 03:36 AM
<? $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 ?

briintex1
10-11-2004, 03:46 AM
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>

firepages
10-11-2004, 04:26 AM
well I just checked your site and it appears to be working now ? /index.php at least



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum