|
Posted by Ian Davies on 05/30/06 17:37
Your a saviour Rik cheers
Works a treat.
out of interest what is the script doing? I cant work it out
Ian
"Rik" <luiheidsgoeroe@hotmail.com> wrote in message
news:3bc14$447c29c0$8259c69c$11252@news2.tudelft.nl...
> Ian Davies wrote:
> > hi jerry
> > the data is in a session, and it retains itself during the first form
> > post. however I cannot get it to remain when the second form posts,
> > even though the sessions are still true and the textbox and
> > radiobuttons values are are still set to the session. I think it has
> > to do with the second form somehow. it seems that it is influencing
> > the textbox and radiobutton's values. but i cant work out why
> > ian
>
> I suspect the problem is this:
> $_SESSION['pupilfield'] = trim($_POST['pupilfield']);
> $_SESSION['gender'] = trim($_POST['gender']);
>
> After the second form, this $_POST values are non-existent, so null, and
> hence $_SESSION[key] get's set to null.
>
> Use:
> $_SESSION[key] = (isset($_POST[key])) ? trim($_POST[key]) :
$_SESSION[key];
>
> Grtz,
> --
> Rik Wasmus
>
>
Navigation:
[Reply to this message]
|