Having some problem passing two variables through each other, I'm sure it's something simple, but needed some fresh eyes.
This is the form on page 1, which is then handled on page 2
Page1:
<?php
$fl=mysql_query("SELECT * FROM fixtures WHERE tournament='{$_POST['div']}' AND played=0", $c);
print "<table border=1><form action='page2.php?stage=0' method=post>";
while ($fx=mysql_fetch_array($fl))
{
print "<tr><td><input type=checkbox value='". $fx['fixtureid'] ."' name='match[]'></td><td>
{$fx['homename']}</td><td>v.</td><td>{$fx['awayname']}</td><td>Turn {$fx['turn']}</td></tr>";
}
print "</table>";
print "<br /><br /><input type=submit value='Continue'";
print "</form>";
?>
- <?php
- $fl=mysql_query("SELECT * FROM fixtures WHERE tournament='{$_POST['div']}' AND played=0", $c);
- print "<table border=1><form action='page2.php?stage=0' method=post>";
- while ($fx=mysql_fetch_array($fl))
- {
- print "<tr><td><input type=checkbox value='". $fx['fixtureid'] ."' name='match[]'></td><td>
- {$fx['homename']}</td><td>v.</td><td>{$fx['awayname']}</td><td>Turn {$fx['turn']}</td></tr>";
- }
- print "</table>";
- print "<br /><br /><input type=submit value='Continue'";
- print "</form>";
- ?>
-
Page 2
I need to be able to use the value of '$s' to return $m0, with 0=$s, so at some points $s will be between 0-15 and will need to return $m(0-15)
$s=$_GET['stage'];
$match=$_POST['match'];
$m0=$match[0];
- $s=$_GET['stage'];
- $match=$_POST['match'];
- $m0=$match[0];
-
Thanks for any help.