TechTalkz.com Logo

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Software World > Programming

Notices

PHP Style Switcher - XHTML 1.0 Strict Validation Error

Programming


Reply
 
Thread Tools Display Modes
Old 03-06-2009, 06:56 PM   #11
ƒ(ψ)=ΘΊΧφ
 
bakuryu's Avatar
 
Join Date: May 2006
Location: India
Age: 23
Posts: 6,621
Thanks: 19
Thanked 645 Times in 603 Posts
Rep Power: 87 bakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant future


OS: Windows XP Windows Vista Windows 7


Send a message via Yahoo to bakuryu
Re: PHP Style Switcher - XHTML 1.0 Strict Validation Error

then what does this close ?

<link rel="stylesheet" type="text/css" media="screen" title="User Defined Style" /> <?php echo href=(!$_COOKIE["sitestyle"])?'default':$_COOKIE["sitestyle"].css /> ?>

does the php code actually compile now ? also if that already closes the link tag then the href attribute is outside your link tag, means the css file won't be included. Does the page display as it should in a browser ?
__________________
Please don't click here
bakuryu is offline   Reply With Quote
Old 04-06-2009, 01:16 AM   #12
Col
Newbie
 
Join Date: May 2009
Posts: 10
Thanks: 1
Thanked 1 Time in 1 Post
Rep Power: 0 Col is an unknown quantity at this point


OS: Windows Vista


Re: PHP Style Switcher - XHTML 1.0 Strict Validation Error

That particular closing tag should not be there - left over from when I was trying to get the code to validate.

Have now achieved that, but the script will not work now!

Any ideas?
Col is offline   Reply With Quote
Old 04-06-2009, 03:16 AM   #13
ƒ(ψ)=ΘΊΧφ
 
bakuryu's Avatar
 
Join Date: May 2006
Location: India
Age: 23
Posts: 6,621
Thanks: 19
Thanked 645 Times in 603 Posts
Rep Power: 87 bakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant future


OS: Windows XP Windows Vista Windows 7


Send a message via Yahoo to bakuryu
Re: PHP Style Switcher - XHTML 1.0 Strict Validation Error

you can use something like this :

PHP Code:
<?php
$stylesheet 
'<link rel="stylesheet" type="text/css" media="screen" title="User Defined Style" href="' . ((!$_COOKIE["sitestyle"])?"default":$_COOKIE["sitestyle"]) . '.css" />';
print 
$stylesheet;
?>
bakuryu is offline   Reply With Quote
Thanked Users:
Strider (04-06-2009)
Old 04-06-2009, 12:17 PM   #14
Col
Newbie
 
Join Date: May 2009
Posts: 10
Thanks: 1
Thanked 1 Time in 1 Post
Rep Power: 0 Col is an unknown quantity at this point


OS: Windows Vista


Thumbs up Re: PHP Style Switcher - XHTML 1.0 Strict Validation Error

You, my friend, have just solved my problems. The piece of code validates as xhtml 1.0 strict, and the style switcher works - excellent!

My grateful thanks to bakuryu
Col is offline   Reply With Quote
Reply

Thread Tools
Display Modes



< Windows Help - MS Office Help - Hardware Support >


New To Site? Need Help?

All times are GMT +5.5. The time now is 01:45 PM.


vBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2009, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional