lloydkangaroo
New Member
In my image.php file i have code\[code\]$id=abs($_GET['id']);$query = mysql_query("SELECT image FROM table1 WHERE id=$id");$data=http://stackoverflow.com/questions/9601583/mysql_fetch_array($query);header('Content-type: image/jpg');echo $data['image'];\[/code\]And while retrieving i am using query\[code\]$query = mysql_query("SELECT id FROM table1"); while($data=http://stackoverflow.com/questions/9601583/mysql_fetch_array($query)) { echo'<'.'img src="http://stackoverflow.com/questions/9601583/image.php?id='.$data['id'].'">';\[/code\]It is perfectly displaying images from my data base...But i want to detect which image user clicked for that i tried \[code\]echo '<'.'img src="http://stackoverflow.com/questions/9601583/image.php?id='.$data['id'].'" onclick="doSomething()">';\[/code\]this onclick java script function doesn't getting call..(i am using mozilla fire fox)I am new to PHP. Finally I need to detect the clicked image among the images which are displayed using PHP echo from Mysql.Is there any other way that i can follow for this?