Still banging my head, but I think an answer may help me see how things really work. I always sucked at languages, but I figure with your help I can brute force this.
So I am just going to post the whole code so as not to cause confusion.
<html>
<head>
<title>Change a player</title>
</head>
<BODY >
<?php
include "inc.php";
session_start();
print 'Select week for season: ';
print $this_season;
##the week drop down query#
$wquery=
"select week_num,week_name
from stats_week
where season=$this_season
order by week_num";
$wresult=mysql_query($wquery);
print'<form action="changeplayer_2.php" method="post">';
session_start();
print"<select name='Week_select'> <br>";
while ($wrow=mysql_fetch_array($wresult))
{
print '<option value="'.$wrow['week_num'].'">'.'week '.$wrow['week_num'].' '.$wrow['week_name'].'</option><br>\n';
}
print "</select><br><br>";#
print'<button type="submit" >Next</button>';
$varWeek=$_POST['Week_select'];
print"</form>";
$_SESSION['week'] = $varWeek;
?>
</body>
</html>
So, I don't know how to get 'Week_select' to be assigned to $_SESSION['week']. Above code was my last ditch effort. Secondly, once I assign something to the Session, how do I clear it out later so it doesn't keep popping up? Bonus question
print 'Select week for season: ';
print $this_season;
Is the only way I can make the both the statement and the variable to display. When I do
print 'Select week for season: '$this_season;
I don't get the variable displayed, also when I do
print 'Select week for season: $this_season';
I get Select week for season: $this_season displayed