Hi everybody!
I've got problem with passing variables between pages.
I have page1.php with :
<form action="page2.php" method="POST">
<select name="subject" size=1>
<option> Chemistry
<option> Math
</select>
<input type=submit name="submit" value="Submit">
</form>
For example, user have chosen "Math"
page2.php:
/$student - 2D array with element [0][0] -Math /
if ($student[0][0]==$subject) {
echo $student[0][0]; // it's working o.k., prints "Math"
/ Then I need to pass $subject to page3.php /
<form action="page3.php" method="POST">
<input type=hidden name="subject"
value="<? echo ($subject); ?> ">
<input type=submit name="submit" value="Add">
</form>
page3.php
//page3.php has the same 2D array $student
echo $subject;
/ it's still working, prints Math /
But
if ($student[0][0]==$subject) {
echo $student[0][0]; // it's not working, it prints nothing.
Thank you in advance.
Stas.