Hi I’m displaying images from a mysql query onto a page. Each image is a submit link for a form. Each form has to have a unique name, or its submit function will not work when clicked. So I made the form names equal to the image filenames.
This is not working because sometimes images are displayed more than once per page (this is the way it’s supposed to work). So I tried making the form names equal to “filename(current_time_in_microseconds)”. But the script is too fast for that and all the form names end up with the same value for “current_time_in_microseconds”, still leaving open the possibility for duplicate form names where there are duplicate images.
So how might I go about doing this? If I could find a way to do it with time somehow that would be ideal, because I would have to worry about tracking how many total images (and forms) had been printed to the page. I’m knee deep in nested functions you see, so that would mean passing a bunch of variables I’d like to try to avoid.
So, I’m pretty sure from what I’ve read that PHP will only do microseconds, and not nanoseconds. Is this correct? And can anybody think of a simple way to accomplish this?
Thanks for any input,
== Matt