Problem in passing the necessary variable.

From: Date: Wed, 26 May 2004 15:11:42 +0000
Subject: Problem in passing the necessary variable.
Groups: php.db 
Request: Send a blank email to php-db+get-34567@lists.php.net to get a copy of this message
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

« previous php.db (#34567) next »