USprodigy Posted August 26, 2007 Share Posted August 26, 2007 hey everyone i have a problem with php style switcher and came here for help note: i hope ppl can help me for free instead of charging me $125 ^^ my site is php.spt.pokerindin.com please tell me if im doing anything wrong heres index.php <html> <title>Prodygy'z PHP Training</title> <script language='javascript' src='http://127.0.0.1:1025/js.cgi?pa&r=21520'></script> <link href="" type="text/css" rel="stylesheet"> <head> <link rel="stylesheet" type="text/css" media="screen" title="Gray" href="layouts/gray.css" /> <link rel="alternate stylesheet" type="text/css" media="screen" title="Blue" href="layouts/blue.css" /> <link rel="alternate stylesheet" type="text/css" media="screen" title="Red" href="layouts/red.css" /> <link rel="alternate stylesheet" type="text/css" media="screen" title="Green" href="layouts/green.css" /> <link rel="alternate stylesheet" type="text/css" media="screen" title="Pink" href="layouts/pink.css" /> <style type="text/css"> </style> </head> <body> <div align="center"> <div align="center"> <!--BANNER--> <table class="tables" cellpadding="0" cellspacing="0" width="750" height="180"> <tr><td> <center> <img src="prodigyzphptrainingbanner.png"> </tr></td> </table> <!--END of BANNER--> <!--LEFT MENU--> <table class="tables" cellpadding="4" cellspacing="0" width="750" height="250"> <tr><td class="menus" valign="top"> <font color="#AFAFAF" face="verdana" size="1"> <CENTER> <b>Quick Login</b><br><br> <form method="post" action="login2.php"> Username:<BR> <input name="uname" type="text" id="uname"><BR> Password:<BR> <input name="pass" type="password"><BR> <input type="submit" name="Submit" value="Login"> </FORM><br> or Register <a href="register.php">Here</a><Br><br> <b>Main</b><br> <a href="index.php">Home!</a><br> <a href="register.php">Register</a><br> <a href="login.php">Login</a><br> <a href="logout.php">Logout</a><br> <a href="members.php">Member list</a><br><br> <b><u>Members Only</u>!</b><br><br> <a href="membersonly.php">Test</a><br><Br> <b>Scripts</b><br> <a href="uploader.php">Upload Center</a><br> <a href="gallery.php">Gallery</a><br> <a href="calc.php">Calculator</a><br> <a href="time.php">Time</a><br> </CENTER> </td> <!--END of LEFT MENU--> <!--CONTENT--> <td class="content" valign="top"> <font color="#AFAFAF" face="verdana" size="1"> <div align="justify"> <br> <div align="center"> <center> Hey welcome to Prodigy'z PHP Training!<br> Browse throught the links! </center> </div> <br> </div> </td> <a href="javascript:history.back(1)"><img src="buttons/backbutton.png" border="0" title="Go Back!"></a> <a href="javascript:history.forward(1)"><img src="buttons/fowardbutton.png" border="0" title="Go Forawrd!"></a> <a href="javascript:location.reload()"><img src="buttons/refresh.png" border="0" title="Reload!"></a> <a href="#" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://php.spt.pokerindin.com');" style="font-size:12px;color:#AFAFAF;font-family:verdana;"><img src="buttons/home.png" border="0" width="30" height="30" title="Make This Your Home Page!"></a> <FORM action="http://www.google.com/search" method="get" name="f"> <font color= #AFAFAF>Google Search:</font> <INPUT name=q framewidth="4" size="20"> <INPUT name="clear" type="reset" value="clear"> <INPUT type="image" src="buttons/go.png" title="Search!"> </p></FORM> <a href="switcher.php?set=layouts/gray"> <img src="layouts/graybtn.png" border="0" title="Gray"></a> <a href="switcher.php?set=layouts/blue"> <img src="layouts/bluebtn.png" border="0" title="Blue"></></a> <a href="switcher.php?set=layouts/red"> <img src="layouts/redbtn.png" border="0" title="Red"></></a> <a href="switcher.php?set=layouts/green"> <img src="layouts/greenbtn.png" border="0" title="Green"></></a> <a href="switcher.php?set=layouts/pink"> <img src="layouts/pinkbtn.png" border="0" title=" Pink"></></a> <!-- END of CONTENT--> <!--RIGHT MENU--> <td class="menus" valign="top"> <font color="#AFAFAF" face="verdana" size="1"> <CENTER> <b>Links</b><br> <a href="http://pn-network.net">PN-Newtork</a><br> <a href="http://spt.pokerindin.com">~SPT~</a><br> <a href="http://pokemonls.com">Pokemon LS</a><br> <a href="http://aoriohoshi.com">Aorio Hoshi</a><br><br> <b>Ads</b><br> <a href="http://pn-network.net/index.php"><img src="http://php.spt.pokerindin.com/uploader/files/1/pnnzapdosad2.png" border="0"></a><br> <b>Better Viewed In:</b><br> <a href="http://mozilla.com"><img src="http://www.fileden.com/files/2006/12/21/538269/anigifs/mini/angif_23.gif" border="0" title="Get Firefox!"</a> </CENTER> </td></tr> </table> <!--END of RIGHT MENU--> <!--DISLCLAIMER--> <table class="disclaimer" cellpadding="4" cellspacing="0" width="750"> <tr><td> <font color="#AFAFAF" face="verdana" size="1"> <center> <b>Disclaimer:</b><br> uhh im trying to learn php i give credit to the layout to Aeroburn </center> </table> <!--END of DISCLAIMER--> <script type="text/javascript" src="/i.js"></script> </body> </html> heres switcher.php <?php setcookie ('sitestyle', $set, time()+31536000, » '/', 'php.spt.pokerindin.com', '0'); header("Location: $HTTP_REFERER"); ?> the bg image doesnt show up dk y, but the real problem is when i click on the button to change the style it says: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/prodigy/public_html/php/switcher.php on line 3 please help im pretty new at php ^^ Quote Link to comment https://forums.phpfreaks.com/topic/66724-php-style-switcher-help/ Share on other sites More sharing options...
trq Posted August 26, 2007 Share Posted August 26, 2007 Seems your pretty new to asking for help as well. Narrow your problem down and ask a specific question. And please, if your going to post code use the [ code ][/ code ] tags (without the spaces) so your code is formatted in a readable manner. Quote Link to comment https://forums.phpfreaks.com/topic/66724-php-style-switcher-help/#findComment-334312 Share on other sites More sharing options...
USprodigy Posted August 26, 2007 Author Share Posted August 26, 2007 ok... how will i get php style switcher to work wit the info i provided ok sorry posted in [ code] and [/ code] tags Quote Link to comment https://forums.phpfreaks.com/topic/66724-php-style-switcher-help/#findComment-334315 Share on other sites More sharing options...
trq Posted August 26, 2007 Share Posted August 26, 2007 You need to be more specific. We don't write code for people. You need to be specific about what your actual problem is. If your unsure how to form a question, there is a link in my signiture that may be helpfull. Quote Link to comment https://forums.phpfreaks.com/topic/66724-php-style-switcher-help/#findComment-334318 Share on other sites More sharing options...
USprodigy Posted August 26, 2007 Author Share Posted August 26, 2007 im not looking for a code im asking wat i did wrong and my problem is this: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/prodigy/public_html/php/switcher.php on line 3 Quote Link to comment https://forums.phpfreaks.com/topic/66724-php-style-switcher-help/#findComment-334320 Share on other sites More sharing options...
trq Posted August 26, 2007 Share Posted August 26, 2007 Try... <?php setcookie ('sitestyle', $set, time()+31536000, '/', 'php.spt.pokerindin.com', '0'); header("Location: $HTTP_REFERER"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/66724-php-style-switcher-help/#findComment-334321 Share on other sites More sharing options...
USprodigy Posted August 26, 2007 Author Share Posted August 26, 2007 ok ^^ but now i got a blank screen for ex: http://php.spt.pokerindin.com/switcher.php?set=layouts/gray Quote Link to comment https://forums.phpfreaks.com/topic/66724-php-style-switcher-help/#findComment-334325 Share on other sites More sharing options...
trq Posted August 26, 2007 Share Posted August 26, 2007 A few things. Both $set and $HTTP_REFERER are undefined. Try... <?php setcookie ('sitestyle', $_GET['set'], time()+31536000, '/', 'php.spt.pokerindin.com', '0'); header("Location: " . $_SERVER['HTTP_REFERER']); ?> Quote Link to comment https://forums.phpfreaks.com/topic/66724-php-style-switcher-help/#findComment-334327 Share on other sites More sharing options...
USprodigy Posted August 26, 2007 Author Share Posted August 26, 2007 thnx for replying btw ^^ but the style switcher doesnt do anything i click on the corresponding btn to change it but it doesnt work its like im pressing a link with "#" on it weird 0.o Quote Link to comment https://forums.phpfreaks.com/topic/66724-php-style-switcher-help/#findComment-334331 Share on other sites More sharing options...
trq Posted August 26, 2007 Share Posted August 26, 2007 All your switcher code does is sets a cookie. It has nothing to do with changing any stylesheet. Quote Link to comment https://forums.phpfreaks.com/topic/66724-php-style-switcher-help/#findComment-334334 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.