function xyz()
<a href="<?=$rame['img_link']; ?>"  ><img src="img/<?=$rame['preview']; ?>" width="<?=$w;?>" height="<?=$h;?>" alt="<?=$rame['name']; ?>" /></a>

Using function I get image and url
suppose image->url=http://www.daniweb.com

I want to do like...
when user click on this image i want to save count(hit) into database(mysql)

How to do this...??

In the script (the url), check if the user is a unique user (by checking his IP address). If he is a unique user, update count. :-/ You can't call a javascript event (onclick) to update the table. You can try the same with Ajax though.
ie., Onclick, call the ajax function, check the user's IP and then update the table if he is a unique user.

Hi nav33n,

Can you give me sample example how to do this using Ajax??

Sorry! I don't have a sample example. But this example is the closest I could find.
In the example, onkeyup event is used, which calls the ajax function whenever a key is pressed (and give suggestions). Instead, you can have onclick event, which will call the ajax function, which checks the user's IP and update the count.