Forum Moderators: coopster
I want to detect the current size using session vars and avoid any additional text on the end of my web address (ie.?action=new&large)
Currently to set large pictures the user clicks a button which redirects the user back to the current page with "&large" on the end of the web address.
My PHP then sets the session varaible when it detects this, next time the page is loaded it remembers.
if (isset($_REQUEST['large']) $_SESSION['large'] = 1;
$picSize=150;
if (isset($_SESSION['large']))
if ($_SESSION['large'] == 1) $picSize=250;
Advice.
---
Also, how do those websites keep just the main web address www.#*$!.com at the top and stop showing the full address. /products/list.php. Other than using frames I can't see how it's done.
Perhaps some clever .htaccess mod?
As for your second question, this 'could' be done some other way than frames but it would be very goofy indeed. I'd see the display of the real, full url in the address bar as an advantage rather than a disadvantage.
Thanks.
I don't quite mean that.
I can hide the session variables. I already use session cookies if available. However, when the user first clicks a button and I want that action to change a session var, is this the only way to do it, post a variable to the script, detect this and set the session varaible.
Is there a clean way to post variables with out creating a form within the HTML script.
The data you send is either going to be in the URL or a form. If you are trying to create a pretty URL to set variables, that's possible with mod_rewrite (assuming you're using Apache).
So with a little work your link could send the user to
/dir/new_large
.. instead of: /dir/picture.php?new&large