This is a discussion on "[SOLVED] Changing Colours" within the PHP Forum section. This forum, and the thread "[SOLVED] Changing Colours are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] Changing Colours
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|
|
||||
|
Re: Changing Colours
I would just set up a .css file for each colour scheme and then use a script that stores the prefered scheme in either $_GET, $_SESSION or $_COOKIE to write the required file to the page.
If you have a database backend you could do the same thing with a DB query. I wrote a similar snippet for swagner in [SOLVED] PHP Printer-Friendly Page Cheers
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
||||
|
Re: Changing Colours
Hi, thanks for your help, but I am complete beginner at php you see, so don't really have a clue what is being said in that link you sent me, sorry for being such a dumb***, could you try walk me through it a bit more please!
Thanks Cracka |
|
||||
|
Re: Changing Colours
Can Anyone Help Me With This?
|
|
||||
|
Re: Changing Colours
do you have any code already?
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
||||
|
Re: Changing Colours
No, complete beginner, I know nothing really about php!
|
|
||||
|
Re: Changing Colours
HTML code?
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
|||
|
Re: Changing Colours
|
|
||||
|
Re: Changing Colours
Okay, say you have 4 styles of css you can use the below code.. Just replace your current <link etc.. with the PHP below, then add a form or link on your site that sends style=(1,2,3 or 4) to your pages.
eg. http://www.example.com/index.php?style=1 and for the rest of that session they will have that style. Cheers
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
||||
|
Re: Changing Colours
Hi Rakuli!
I have tried what you have suggested but it is still not working :S, and the link you sent me doesn't work, so that doesn't help me! Do i have to use .php extension, or can i stick with the html? Thanks Cracka |
|
||||
|
Re: Changing Colours
Hi Cracka, the link is example.com and is used to actually show examples
You need to have .php extensions for this to work, .html will not work unless without some apache tricks.
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
||||
|
Re: Changing Colours
Ok, thanks, my bad :P
Well i will have a look see if that does anything, and i will get back to you! Thanks Cracka |
|
||||
|
Re: Changing Colours
No, it is still not working
Here is a screenshot of what my webpage looks like using that code, hoping that would help! Thanks Cracka |
|
||||
|
Re: Changing Colours
LOL can't say that helps at all.
Can you post the code in the way you have integrated it? say 10 lines before and after the PHP so see how you have dropped it in.. Cheers
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
||||
|
Re: Changing Colours
Here is the code!:
Cracka |
|
||||
|
Re: Changing Colours
To ask a couple of obvious questions, you're going to yoursite/index.php?style=1/2/3 or 4 and you have your stylesheets in the same directory as the page?
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
||||
|
Re: Changing Colours
No that didn't work, the top images didn't work, because it was set to webforumz
So it is still not working! && Yess, my stylesheets are in the same directory as the index file, any other suggestions? Thanks Cracka |
|
||||
|
Re: Changing Colours
I have no idea how that happened
Have you viewed the source to see if a different link is being written each time? Can you also check your PHP error log. Cheers
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
||||
|
Re: Changing Colours
Hi!
There is no error coming onto the page, its just rearrangeing the text and images funny, so i am still confused, would it be easier for me to send the zip file to you, and you have a play around with it? Thanks Cracka |
|
||||
|
Re: Changing Colours
Yeah do that
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] Changing onfocus of a textbox | djeyewater | JavaScript Forum | 5 | Jan 5th, 2008 17:38 |
| [SOLVED] CSS changing page colour etc | R8515198 | Web Page Design | 10 | Nov 27th, 2007 00:54 |
| [SOLVED] changing links colours using html | R8515198 | Web Page Design | 32 | Nov 12th, 2007 08:19 |
| [SOLVED] Changing from html to CSS | mcdanielnc89 | Web Page Design | 16 | Oct 11th, 2007 04:29 |
| [SOLVED] Changing pictures on same page | R8515198 | JavaScript Forum | 7 | Oct 3rd, 2007 00:14 |