A Tricky PHP/HTML Question



A.1 If you want use random see images from the DB do next all images in array and use shuffle command.
A.2 About some space between images
solution 1: use dreamweaver for this (faster and simply)
solution 2: see maby other cell in youre table have a size more the other
solution 3: if S1 and S2 not help you see solution 1
well to get the screenresolution there's only one way....Javascript :( Which sux ofcourse, but you can use it (with screen.width and screen.height.....but you could make it like
var width = screen.width;
var height= screen.height;
window.location = "http://yourserver.com/index.php?width=" + width + "&height=" + height;

something like that....
As far as getting the screen resolution, there's no automatic way that I know of that doesn't involve client side scripting (pretty much as stated above) I make a point of avoiding client side scripting like the plague. One way to get this info relatively quickly is to let the user select screen resolution right from the get go. I would have your splash page start out at 800x600, (or 640x480, altho that's not the default it used to be), and let the user click links for 'larger screen' or 'smaller screen' until they get something that looks just right for them.

As far as the extra spaces in your table, this kind of thing is common and annoying. The most common cause I've found for this is 'whitespace' automatically added when '<TD>' and '</TD>' tags are Not output on the same line. This sounds goofy, but it does have an impact. I've had the best luck getting rid of that by building all the contents of table cells into strings are arrays, and then spitting the whole table out at the end.

Hope this helps.