Jump to content
xisto Community
Sign in to follow this  
street

Php Styleswitcher I Need some help

Recommended Posts

OK i followed this tutorial on how to make a php based style switcher and the code just does not seem to work for me. I keep getting this error

Warning: Cannot modify header information - headers already sent by (output started at /***/***/***l/***/setstyle.php:4) in /***/***/***/***/setstyle.php on line 181

 

Line 4

<meta name="keywords" content="neo-evolution,neoevolution

Line 181
If anyone can try out this code and get the styleswitcher to work can you please tell me what i copied wrong cause i typed out the exact code from the site.

The tutorial can be found here

Also if anyone knows any good php style switcher tutorials please free to post them.
Edited by street (see edit history)

Share this post


Link to post
Share on other sites

In my opinion: Get rid of the header—it's unnecessary; you're gonna be switching styles through links or whatever anyways (according to the tutorial), therefore no need for that header. The rest of the tutorial should take care of everything else.

Share this post


Link to post
Share on other sites

That error means that the page already sent the header to the browser before you used the header function. Even though truefusion is right, you don't need the header, if you want it, you have to put it before you echo anything out to the browser.

Share this post


Link to post
Share on other sites

just abit of help. In this case your headers are the promblem,get rid of them. Also when a coding/script does work the way it should literly doesnt mean something is wrong with the script/coding, your server might not support it,and so displays errors such as a flash of the same page or displaying a blank page. So always keep that in mind when using new codes/scripts.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.