Problem in passing the necessary variable.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have developed a news system .. I can select to insert an image into the
articles. 

The function to extract the image calling them by the "imgid" of images
table is the following: 

function getImm() {
	?>
      <select name="image">
        <?
		connect();
		$sql = "select * from images";
		$result = mysql_query($sql);
		while($row = mysql_fetch_array($result)) {
		printf("<option value=\"%s\">%s</option>", $row["id_img"], $row["imgid"]);
		}
		?>
      </select> 
	    <?

I'd like to be able to see the image before to publish the piece of news. 

I think about a window pop up with java in order to create a preview of the
image. The code follows:

<a href="../images/image.php?img=XXXXXXXXXX" target="_blank"
onClick="window.open(this.href, this.target, 'width=200,height=250');
return false;"><img SRC="../preview.jpg" ALT="Click to look at the picture
you are charging" border="0"></a>

The problem is that I can't pass the "imgid" to the href inspite of the
XXXXXXXX  

May someone tell me how to pass the id number in order to show me the image
or how may I solve the trouble?

I hope someone will help me ...

Sincerely,
			Alexander

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux