I'm having some trouble with including some info. Currently I have
matches.php:
<form action="season.php" method="get" name="seasonlist" id="season">
<select name="season[]" id="season" onChange="MM_jumpMenu('parent',this,0)">
<option>Choose a Season</option>
<option>Season 5 (CAL-O)</option>
<option>Season 6 (CAL-IM/M)</option>
<option>Season 7 (CAL-M)</option>
<option>Season 8 (CAL-M)</option>
<option>Season 9 (CAL-M)</option>
</select>
</form>
season.php:
<?php
switch ($season){
case $season[1]:
$var = $_POST['season']."5.txt";
break;
case $season[2]:
$var = $_POST['season']."6.txt";
break;
case $season[3]:
$var = $_POST['season']."7.txt";
break;
case $season[4]:
$var = $_POST['season']."8.txt";
break;
case $season[5]:
$var = $_POST['season']."9.txt";
break;
}
?>
But when I try it, it doesn't seem to be working. It goes to the main folder that the objects are placed in instead of accually displaying the contents. Is there something i am doing wrong here?
Also, I have tried another way.
matches.php:
......
<option value="./matches.php" selected>Choose a Season</option>
<option value="<?php include("5.txt"); ?>">Season 5 (CAL-O)</option>
<option value="<?php include("6.txt"); ?>">Season 6 (CAL-IM/M)
......
This works somewhat. The only problem is, when i open the page, it already displays the contents of 5.txt when the option isn't selected with the rest of the contents below it; Season 6 (CAL-IM/M), etc. How could i chagne this?
Thank you