|
Posted by Ian Davies on 05/30/06 02:01
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
"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
news:d4GdnWq6yeSp5-bZnZ2dneKdnZydnZ2d@comcast.com...
> Ian Davies wrote:
> > Hi me again,
> > sorry to be a pain. Ive been struggling with this one all day. Hope you
can
> > understand whats happening. First my script is below. Have a look and
I'll
> > explain at the bottom what it does so far and is failing to do
> >
>
> <code sniped>
>
> > first form
> > OK well first an array of buttons is created with their values coming
from a
> > database. a textbox is filled and radiobutton selected when this form is
> > posted on clicking a button in the array the page is resubmitted
> > ('PHP_SELF') resulting in sessions being created from the text field and
> > radio buttons. The values of the textfield and radiouttons are set to
the
> > sessions so that the values persist on the page during 'PHP_SELF'.
> >
> > Problem arrises on the second form where values from a list are posted
and
> > copied into the final textfield at the bottom. During this second form
> > posting the values in the textbox and radio buttons are lost. I want
them to
> > remain until the sessions are made false. can anyone help.
> >
> > I know its alot of code to untangle but Im really stuck on this one
> >
> > Ian
> >
> >
>
> Ian,
>
> I haven't looked at your code in detail - but I think your problem is how
the
> data is being submitted.
>
> When you submit a form, only data from that specific form is in the $_POST
(or
> $_GET) value. Data from other forms on the page will not be submitted.
>
> If you want to keep data from the first form after submitting the second
one,
> you have a couple of choices. You can put the first form data in the
session
> (my favorite). You can also store it in hidden fields in the second form
(also
> works well).
>
>
>
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstucklex@attglobal.net
> ==================
Navigation:
[Reply to this message]
|