Page 4 of 4 FirstFirst 1234
Results 31 to 35 of 35
  1. #31
    Join Date
    Dec 2004
    Location
    UK
    Posts
    534
    Tokens
    141

    Default

    wahoo thanks guys, finally workin.

    +rep 4 all hu helped :]
    Post Count: :eusa_danc 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000 :eusa_danc

  2. #32
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    Glad you've got it working

    Fyi; I might release a new version of the Panel soon to fix all the security issues/bugs

  3. #33
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Quote Originally Posted by Ini View Post
    As 01101101entor said

    Code:
     header('location: miniprofile.php?name='.$_SESSION[username]);
    but put as:

    Code:
     header('location: miniprofile.php?name=$_SESSION[username]');
    You'll find my bit of code was correct, though i can see what your attempting to do.
    Your problem here is PHP treat's single quotes ' and double quotes differently, and unluckily you appear to have chosen the wrong one.

    If php sees a string with double quotes, php will check to see if any varibles are inside, Which i believe is what you were trying to do, so:

    header("location: miniprofile.php?name=$_SESSION[username]");

    Would indeed work.

    Unluckily if php comes across a single quote, this tells php there isnt going to be any variables inside, saving it some processing time, but also resulting in it not searching the string for variables.
    Meaning your attempt

    header('location: miniprofile.php?name=$_SESSION[username]');

    Would be unsuccessful.


    "" = will parse variables
    '' = faster but wont parse variables

  4. #34
    Join Date
    Sep 2006
    Posts
    2,114
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by 01101101entor View Post
    You'll find my bit of code was correct, though i can see what your attempting to do.
    Your problem here is PHP treat's single quotes ' and double quotes differently, and unluckily you appear to have chosen the wrong one.

    If php sees a string with double quotes, php will check to see if any varibles are inside, Which i believe is what you were trying to do, so:

    header("location: miniprofile.php?name=$_SESSION[username]");

    Would indeed work.

    Unluckily if php comes across a single quote, this tells php there isnt going to be any variables inside, saving it some processing time, but also resulting in it not searching the string for variables.
    Meaning your attempt

    header('location: miniprofile.php?name=$_SESSION[username]');

    Would be unsuccessful.


    "" = will parse variables
    '' = faster but wont parse variables
    Ok thanks for explaining
    Looking for a good desiner to design a social networking template.

    PM me.

  5. #35
    Join Date
    Jan 2007
    Location
    Wales
    Posts
    2,432
    Tokens
    141

    Latest Awards:

    Default

    How did you manage to get it working in the end then?
    Free Online Games And Videos:
    http://www.vincesgames.com



Page 4 of 4 FirstFirst 1234

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •