Page 1 of 1

Tournament Form, help with 3rd place.

Posted: Fri Mar 10, 2006 1:36 am
by ForeverIrise
Well I was looking on the web for a while to see if there was a site made for the World Cup 2006 in which one can make their bracket and print it out, couldn't find one so I made my own. It has been working great, even with my lack of PHP skills, and I have hit a bump on the road. I can't make a 3rd place finish form. Here is what my final 2 pages look like:


semifinals.php

Code: Select all

<?php
session_start();
header("Cache-control: private"); // IE 6 Fix.

$_SESSION['match57winner'] = $_POST['match57'];
$_SESSION['match58winner'] = $_POST['match58'];
$_SESSION['match59winner'] = $_POST['match59'];
$_SESSION['match60winner'] = $_POST['match60'];

?>
<html>
<head>
<title>Semi Finals</title>
</head>
<body>
<form action="finals.php" method="post" name="semifinals">
  <label>Match: 61
  <select name="match61">
    <option value="<?php echo $_SESSION['match57winner']; ?>"><?php echo $_SESSION['match57winner']; ?></option>
    <option value="<?php echo $_SESSION['match58winner']; ?>"><?php echo $_SESSION['match58winner']; ?></option>
  </select>
  </label>
<br>

  <label>Match: 62
  <select name="match62">
    <option value="<?php echo $_SESSION['match59winner']; ?>"><?php echo $_SESSION['match59winner']; ?></option>
    <option value="<?php echo $_SESSION['match60winner']; ?>"><?php echo $_SESSION['match60winner']; ?></option>
  </select>
  </label>
<br>
  <label>
  <input name="submit" type="submit" value="submit">
  </label>
</form>
</body>
</html>

finals.php

Code: Select all

<?php
session_start();
header("Cache-control: private"); // IE 6 Fix.

$_SESSION['match61winner'] = $_POST['match61'];
$_SESSION['match62winner'] = $_POST['match62'];

$_SESSION['match61runnerup'] = ;
$_SESSION['match62runnerup'] = ;

?>
<html>
<head>
<title>Finals</title>
</head>
<body>
<form action="layout.php" method="post" name="finals">
  <label>Match: 63 - 3rd Place
  <select name="match63">
    <option value="<?php echo $_SESSION['match61runnerup']; ?>"><?php echo $_SESSION['match61runnerup']; ?></option>
    <option value="<?php echo $_SESSION['match62runnerup']; ?>"><?php echo $_SESSION['match62runnerup']; ?></option>
  </select>
  </label>

   <label>Match: 64 - FINAL
  <select name="match64">
    <option value="<?php echo $_SESSION['match61winner']; ?>"><?php echo $_SESSION['match61winner']; ?></option>
    <option value="<?php echo $_SESSION['match62winner']; ?>"><?php echo $_SESSION['match62winner']; ?></option>
  </select>
  </label>
  <label>
  <input name="submit" type="submit" value="submit">
  </label>
</form>
</body>
</html>
As you can see I don't have the match61 or match62 runnerups. What would $_SESSION['match61runnerup'] have to equal to make this work? Thank you for your time.

-Cesar