[SOLVED] explode()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

[SOLVED] explode()

Post by pinehead18 »

Ok, i have been fighting with this for a bit and i'm sure it is just some stupid mistake that i made.

Code: Select all

session_start();
$go_to = $_SESSION['go_to'];
$url = explode("/", $go_to);
unset($_SESSION['go_to']);


  header("location: /".$url[3]."");

Basically what happens is i can echo $url[3] and get the result i want (index.php) or the back end of the url, so i put that in the header so it will foward me back to that page. Instead it fowards me to /p instead of the actual place i came from.

Any ideas?
Thank you
Anthony
?>
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

Post by pinehead18 »

Fixed it.

Thank you
Post Reply