Clinton Posted January 2, 2009 Share Posted January 2, 2009 I'm trying to redirect my members to a page based upon what type of member they are. The variable echos just fine but no matter what I do I cannot get it to separate from the ' or the " or the \ or the / or the . or... well... you get my point... hopefully. How do I do this? if($row['active'] == NULL) { $_SESSION['user_id'] = $row['username']; $_SESSION['access_type'] = $row['accesstype']; $at = $row['accesstype']; $_SESSION['logged_in'] = TRUE; header("Location: $at'member.php'"); }else { Quote Link to comment Share on other sites More sharing options...
ratcateme Posted January 2, 2009 Share Posted January 2, 2009 dont you want header("Location: $at/member.php"); Quote Link to comment Share on other sites More sharing options...
revraz Posted January 2, 2009 Share Posted January 2, 2009 What does $at contain, give an example. There is no reason to put single quotes around member.php. Quote Link to comment Share on other sites More sharing options...
Brian W Posted January 2, 2009 Share Posted January 2, 2009 $_SESSION['user_id'] = $row['username']; $_SESSION['access_type'] = $row['accesstype']; $at = $row['accesstype']; $_SESSION['logged_in'] = TRUE; header("Location: ".$at."member.php"); is that what you need? Quote Link to comment Share on other sites More sharing options...
ratcateme Posted January 2, 2009 Share Posted January 2, 2009 sorry i see now you can also use header("Location: {$at}member.php"); Scott. Quote Link to comment Share on other sites More sharing options...
Clinton Posted January 2, 2009 Author Share Posted January 2, 2009 header("Location: ".$at."member.php"); That's exactly what I needed. I was pretty sure it needed the concoc... however you spell it I just couldn't figure out the right combination. Thank you. All $at is, is a variable that just determines what type of member they are. Just a letter. Quote Link to comment 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.