-
themes
hi, i have question about site themes.
i have css built site which is looking black. Now i had made other style, and i want to create style choosing option in my browser.
you want black theme? you go to options, choose black theme and that theme apllies to your account, until you change it again. is there php script for that or some other way... (sorry for my bad language). Thanks a lot
-
-
You need to have user accounts. Or you can use PHP sessions.
Either way, you will store a variable (in the database, in the $_SESSION data, etc.) and that variable will be something like $theme = 'black'.
Based on that value, you can just load a different stylesheet on your page. (....stylesheet src="<?php echo $theme; ?>.css"...
)
If you want to customize the html on the page as well, that is more difficult, but you can do it the same way-- load the layout html based on the session variable. But that means a lot of coding to make the same content for different layouts.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
but how to rewrite $theme variable to my db because i have to save choosen name(black) in ppl account place. is there php command for rewriting? like updating user info in webpage. Thanks
-
-
noone knows?
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks