What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Why wont this work?

Why wont this work?
Author: Message:
Val
Senior Member
****

Avatar

Posts: 698
Reputation: 45
31 / Other / Flag
Joined: Jun 2004
O.P. Why wont this work?
Hey guys I wanted a way for users to select the style sheet they want to use for  my site and save their selection in a cookie so my friend Ezra wrote this up for me but it dosent work becouse the code just gives me and error "unexpected { on line 4"

so here is the code its not all of it just the part that gives the error
code:
<?php
//Setting the cookie

if(!isset($_COOKIE['css']){
    if(isset($_GET['style']) && $_GET['style'] != ""){
        setcookie("css", htmlspecialchars($_GET['style'], ENT_QUOTES), time()+11156);
        header("/");
    }
}
?>


if you need more code just request it
Menthix:
Anonymous doesn\'t have a leader.
Anonymous is the leader of ShawnZ.

Max:
True. But deep down, we all know.
ShawnZ is incharge.
he is /b/ in human form.
01-05-2006 04:11 PM
Profile PM Web Find Quote Report
L. Coyote
Senior Member
****

Avatar
Captain Obvious

Posts: 981
Reputation: 49
39 / Male / Flag
Joined: Aug 2004
Status: Away
RE: Why wont this work?
quote:
Originally posted by ValSpy
if(!isset($_COOKIE['css']){
There is a ) missing at the end, between the ) and the {

Hack, hack, hack!
Finally became a Systems Analyst! :spam:

01-05-2006 04:25 PM
Profile PM Find Quote Report
Val
Senior Member
****

Avatar

Posts: 698
Reputation: 45
31 / Other / Flag
Joined: Jun 2004
O.P. RE: Why wont this work?
quote:
Originally posted by Leo
There is a ) missing at the end, between the ) and the {
Thanks leo but now I get a 500 error check it out, http://valspy.net/V2/set.php and if you click on in the header of this page it gives same error http://valspy.net/V2/index.php
Menthix:
Anonymous doesn\'t have a leader.
Anonymous is the leader of ShawnZ.

Max:
True. But deep down, we all know.
ShawnZ is incharge.
he is /b/ in human form.
01-05-2006 05:05 PM
Profile PM Web Find Quote Report
Plik
Veteran Member
*****

Avatar

Posts: 1489
Reputation: 46
35 / Male / –
Joined: Jun 2004
RE: Why wont this work?
quote:
Originally posted by ValSpy
quote:
Originally posted by Leo
There is a ) missing at the end, between the ) and the {
Thanks leo but now I get a 500 error check it out, http://valspy.net/V2/set.php and if you click on in the header of this page it gives same error http://valspy.net/V2/index.php

that would most likely be this line:
quote:
Originally posted by ValSpy
header("/");

I assume you're trying to do a header relocation? if you are then you need to do this:
header("Location: the place you are relocating to");
and im not sure if you can use / as the location, you will probably need to use the file, eg, index.php, although im not sure about this
01-05-2006 05:11 PM
Profile PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: Why wont this work?
yeah, I was tired when I made that :P

But I gave him a new working & tested version :)
[Image: 1-0.png]
             
01-05-2006 05:21 PM
Profile PM Web Find Quote Report
L. Coyote
Senior Member
****

Avatar
Captain Obvious

Posts: 981
Reputation: 49
39 / Male / Flag
Joined: Aug 2004
Status: Away
RE: Why wont this work?
quote:
Originally posted by Madman
and im not sure if you can use / as the location, you will probably need to use the file, eg, index.php, although im not sure about this
Yes, you can.

Edit: meh, I didn't see the header("/"); when I replied before (my first reply to this thread). Anyway, in this post I meant you can put header("Location: /");

This post was edited on 01-05-2006 at 05:26 PM by L. Coyote.

Hack, hack, hack!
Finally became a Systems Analyst! :spam:

01-05-2006 05:21 PM
Profile PM Find Quote Report
Val
Senior Member
****

Avatar

Posts: 698
Reputation: 45
31 / Other / Flag
Joined: Jun 2004
O.P. RE: Why wont this work?
Thanks guys for all your help and if you want to test it out go here http://valspy.net/V2/ and I have 3 colors blue, pink, orange if anyone wants to suggest a color please do so here in this thread
Menthix:
Anonymous doesn\'t have a leader.
Anonymous is the leader of ShawnZ.

Max:
True. But deep down, we all know.
ShawnZ is incharge.
he is /b/ in human form.
01-05-2006 06:09 PM
Profile PM Web Find Quote Report
Nathan
Veteran Member
*****

Avatar
Yeah, "large dimensions" ;)

Posts: 2984
Reputation: 76
– / Male / Flag
Joined: Apr 2005
RE: Why wont this work?
Red+Black would go pretty nicely!
Overall good start
Touch Innovation - touch friendly programs/applications for the windows mobile!


01-05-2006 06:31 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On