Home > Archive > PHP SQL > August 2004 > Skinnable website
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| tox_yray 2004-08-18, 3:57 pm |
| Hello, I'm in the process of developping a skinnable website. The
different skins will be stored in different folders that will be
called through URL:
EX:
Default skin = folder "default"
so http://domain.com/index.php will be called by
http://domain.com/index.php?skin=default
A drop down menu will permit the user to select their skin.
PROBLEM #1:
How can I actually set "default" to be a default skin, so
that if I call http://domain.com/index.php
it will go for http://domain.com/index.php?skin=default instead?
PROBLEM #2:
How can I set my drop down menu to do the good action? Here I
currently set my "Par défaut" to the value
"default". What I want to do it take this
"default" value and assign it to a variable so when I
submit the form, a new URL will be formed by something that looks
like this:
newskin = skin
currentpage."?skin=".skin (NOTE:
currentpage is set in the document to be the URL without the
skin)
--------
<form method="POST" action="???">
<p>
<select size="1" name="skin"
tabindex="0">
<option selected
value="default">Par défaut</option>
<option
value="haha">Test</option>
</select><input type="submit"
value="Changer de skin" name="B1"></p>
</form>
--------
Thanks in advance for any help :)
----------------------------------------
The post originated from PHP Freaks:
----------------------------------------
http://www.phpfreaks.com
http://www.phpfreaks.com/forums
| |
| GeoffOs 2004-08-18, 3:57 pm |
| PROBLEM #1:
--------
if (skin =="") {
skin=default
} else {
//is it valid?
}
--------
Beyond a critical point within a finite space, freedom diminishes as
numbers increase....
The human question is not how many can possibly survive within the
system, but what kind of existence is possible for those who do
survive."
-- Frank Herbert - Dune
----------------------------------------
The post originated from PHP Freaks:
----------------------------------------
http://www.phpfreaks.com
http://www.phpfreaks.com/forums
| |
| tox_yray 2004-08-18, 3:57 pm |
| Well, I didn't think about the "valid" thingy... Thanks
to point it out!
----------------------------------------
The post originated from PHP Freaks:
----------------------------------------
http://www.phpfreaks.com
http://www.phpfreaks.com/forums
|
|
|
|
|