You're having trouble accessing
echo "<input type=\"text\" name=\"stuff[$a]\"></input>";
this array (within the for loop) using
if($_POST['submit'] == "submit") {
$foo = $_SESSION['pass'];
for ($a=0; $a<3; $a++)
{
echo "echo $foo[$a] ";
}
}else
that code? The above code (which is the only code that processes if the user has hit submit) is echoing the variable $foo, but in your form, you are setting a variable called stuff.
Also
for ($a=0; $a<3; $a++)
{
echo "<input type=\"text\" name=\"stuff[]\"></input>";
}
That would create an array called $stuff (no need to specify the numbers). Then to call that variable, use
for ($i=0; i < count($stuff); $i++) {
echo $stuff[$i] . "<br>\n";
}
This method is more "dynamic" so to speak becuase it counts the array $stuff and runs the for loop while you still have values, rather than using a set number of times.
Just a suggestion, it comes in very handy.
Cgraz