Posted by Kurda Yon on 01/14/08 02:09
> > OK. In the first.php I have:
> > session_start();
> > session_register("ex");
>
> $_SESSION['ex'] = 2.0;
> $ex = &$_SESSION['ex'];
What for do you introduce $ex variable? What for do you have "&" in
the second line?
>
> > .........
> > <form enctype="multipart/form-data" action="second.php" method="post">
> > .....
> > print "<input type='text' name='ex' value=\"$ex\">\n";
> > .....
> > </form>
>
> > When I submit the form I put in the text field corresponding to $ex
> > 3.0.
>
> > In the second.php I have:
> > session_start();
> > $_SESSION["ex"] = $ex;
>
> Why overwrite the value in the $_SESSION array here? If you're not even
> using it, why store it to begin with?
>
$ex supposed to be a form variable and before to use "header" I would
like to put the values of the form variables into the session
variables.
> > print "===> $txt_l_1";
> > print "---> {$_SESSION["txt_l_1"]}";
>
> Euhm, what magic do you expect from a in this sample code uninitiated &
> unassigned variable $txt_1_1?
Instead of $txt_l_1 should be $ex.
Navigation:
[Reply to this message]
|