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
khaki_monster
Forum Commoner
Posts: 73 Joined: Tue Oct 11, 2005 12:36 am
Location: Philippines
Contact:
Post
by khaki_monster » Sun Feb 05, 2006 11:22 pm
hi again all! with my never ending questions
how do i pass some session variables w/ some values using Header() function.
givin some statements:
Code: Select all
session_start();
$_SESSION['id'] = 'ABC';
// what come next after this line
header("Location: ");
hope you guyz can help me out('as often')
cheerz!
Last edited by
khaki_monster on Mon Feb 06, 2006 3:32 am, edited 1 time in total.
Burrito
Spockulator
Posts: 4715 Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah
Post
by Burrito » Sun Feb 05, 2006 11:33 pm
Code: Select all
session_start();
$_SESSION['id'] = 'ABC';
// what come next after this line
header("Location: your-real-page.php");
you'll need to make sure you're not sending ANYTHING (including whitespace) to the browser above your header() function.
khaki_monster
Forum Commoner
Posts: 73 Joined: Tue Oct 11, 2005 12:36 am
Location: Philippines
Contact:
Post
by khaki_monster » Sun Feb 05, 2006 11:52 pm
Code: Select all
you'll need to make sure you're not sending ANYTHING (including whitespace) to the browser above your header() function.
could you please elaborate it more
coz im not tha well experience with some PHP functions...
Code: Select all
session_start();
$_SESSION['id'] = 'ABC';
header("Location: session_test.php");
session_test.php should have something like:
Code: Select all
<?php
session_start();
$id = $_SESSION['id'];
echo 'Your Session: '.$id;
?>
cheerz!
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Mon Feb 06, 2006 12:05 am
your elaboration can be found here:
viewtopic.php?t=1157
khaki_monster
Forum Commoner
Posts: 73 Joined: Tue Oct 11, 2005 12:36 am
Location: Philippines
Contact:
Post
by khaki_monster » Mon Feb 06, 2006 2:09 am
tanx guyz! it actually works... but i need to test more!
cheerZ!