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 { Link to comment https://forums.phpfreaks.com/topic/139263-solved-header/ 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"); Link to comment https://forums.phpfreaks.com/topic/139263-solved-header/#findComment-728452 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. Link to comment https://forums.phpfreaks.com/topic/139263-solved-header/#findComment-728453 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? Link to comment https://forums.phpfreaks.com/topic/139263-solved-header/#findComment-728454 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. Link to comment https://forums.phpfreaks.com/topic/139263-solved-header/#findComment-728456 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. Link to comment https://forums.phpfreaks.com/topic/139263-solved-header/#findComment-728459 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.