Hello everybody,
I am trying to pass a variable into a form, and I am having issues.
Right now here is what I have:
-config file (this is correct)
-include file: this verifies their login is correct, and then passes them to one of 4 pages (depending on the category taken from the db).
My problem is that i want to pass another variable into either of the 4 forms i present.
Here is what i have so far:
?php
include("include.php");
$db = mysql_connect("localhost", "root", "............");
mysql_select_db("....",$db);
$query="SELECT * FROM captain WHERE username ='$username' ";
$result=mysql_query($query);
$mydata = mysql_fetch_array($result);
//echo $mydata[team_category];
if($mydata[team_category] == 'school')
{
header('Location: [url]http://www............php[/url]');
exit;
}
if($mydata[team_category] == 'youth')
{
header('Location: [url]http://www........php[/url]');
exit;
}
if($mydata[team_category] == 'usatf')
{
header('Location: [url]http://www........php[/url]');
exit;
}
if($mydata[team_category] == 'corporate')
{
header('Location: [url]http://www.......php[/url]');
exit;
}
if($mydata[team_category] == 'volunteer')
{
header('Location: [url]http://www........php[/url]');
exit;
}
?>
how could i pass another variable ($teamname) into whatever page it forwards to?
Should I start a session on this page, and then use a global $_SESSION on the subsquent pages, and finally unregister at the end of the form?
-Michael