Ok you have to take a step back and break this into a couple of steps.
First, I'll answer your questions:
Quote:
|
Now, I know a bit of PHP concerning $_GET variables, but not multiple "get"'s. Are both of the variable names "image" and "orientation" (in this case) accessible by $_GET[]?
|
Yes. Depending on the link clicked, different values will be sent to the PHP page, and accessing the variable using $_GET will give your the appropriate values.
Quote:
|
Is it possible to have the window opened and sized based on the orientation?
|
Yes. This is where we have to understand the steps.
You'll have to open the window to the size that you want first (using Javascript), then load that window with the PHP file which will display the picture and description.
Passing the orientation variable to the PHP page won't give you the desired results (ie. PHP can't open a window, so this has to be done in Javascript).
You should create a Javascript function on your page with the links that will open the window appropriately.
Try something like this:
Code:
function openWindow(orientation, url) {
var w = 0;
var h = 0;
if(orientation.match("h")) {
w = 500;
h = 230;
}
else { //edit these values as necessary...
w = 230;
h = 500;
}
window.open(url,'pic','width='+w+',height='+h+',resizable,scrollbars,status');
}
<a href="#" onClick="openWindow('v', 'index.php?image=imageName&orientation=v')"><img src= ....
That should make sense and do what you're looking for.
Hope that helps,
Sadiq.