Odd problem: Data from hidden field is not sent to server...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Randell D.

    Odd problem: Data from hidden field is not sent to server...


    Folks,

    Perhaps someone can figure this out - this is 'the process of my script'

    I have a form whereby I can add multiple contacts to a single address.
    There is only one firstname/lastname/telephone box - when the user
    clicks the add button, I read the values from the form fields and
    record them into a hidden text input field. This part works because
    during debugging, I have converted the <input type=hidden> into a <input
    type=text> to visably confirm my data is being copied into the 'hidden'
    field.

    Once the user has entered in one or more names, they can click another
    button and submit the form for processing. My idea is that I would then
    parse this hidden field server side...

    I have a WAMPHP based server and as a test, I dump out my entire $_POST
    (basically, the name and value in every INPUT tag).

    My PHP script picks up the name of every input tag, including the hidden
    field (like it should) but for some reason, the value that was written
    to the hidden field is not passed to the server. Thus, for the PHP folk
    reading this post, my hidden input field is called mylist and
    $_POST['mylist'] exists, but its empty. Even though before processing,
    I could visably see the input in the box (for debugging remember, I made
    the input tag box a normal, unhidden one).

    Here is what I have done to try and resolve:
    - I have used both Mozilla 1.7.5 and IE6 - both provide same results -
    my hidden field name gets passed, but not its value.

    - I have created another hidden field and given it a default value ie I
    have <input type="hidden" name="extraone" value="xyz"> and I get
    $_POST['extraone']="xyz" passed to my php server, like I would expect -
    however, the value of mylist is sent empty, even though it has data.

    - I have even put in a javascript alert box just before the form is sent
    to the server and can see the result in my (unhidden) box, and the same
    value displayed in the javascript alert - but again, the value of the
    mylist does not get sent to the server.


    The only difference is that my hidden field (even if its displayed like
    an ordinary text input box) does not post data written to form fields as
    the result of a javascript function. Interestingly though, the server
    does know about the input tag box since it does receive
    $_POST['mylist'], it justs receives it empty.

    What gives? If the form reads my input from one field, and writes it to
    another field, then it should be sent to the server, true?

    Also... my tags are all inside my <form></form> tag (which is proven by
    double checking, and the fact that I do get the input tag box name sent
    to my server).

    Since I can see the data values in the box, it tells me my javascript is
    doing what it should be doing - so I don't see any point in including my
    javascript (though I have no problems doing so if someone requests
    it). On the php server, I am using a simple phpinfo(); to check the
    data is being received...

    Has anybody got any ideas on this one? I'm tired racking my brains on
    this one - I just might go to bed and try a fresh approach after a few
    hours sleep...

    Thanks in advance,
    Randell D

  • Randell D.

    #2
    Re: Odd problem: Data from hidden field is not sent to server...

    Randell D. wrote:
    [color=blue]
    >
    > Folks,
    >
    > Perhaps someone can figure this out - this is 'the process of my script'
    >
    > I have a form whereby I can add multiple contacts to a single address.
    > There is only one firstname/lastname/telephone box - when the user
    > clicks the add button, I read the values from the form fields and
    > record them into a hidden text input field. This part works because
    > during debugging, I have converted the <input type=hidden> into a <input
    > type=text> to visably confirm my data is being copied into the 'hidden'
    > field.
    >
    > Once the user has entered in one or more names, they can click another
    > button and submit the form for processing. My idea is that I would then
    > parse this hidden field server side...
    >
    > I have a WAMPHP based server and as a test, I dump out my entire $_POST
    > (basically, the name and value in every INPUT tag).
    >
    > My PHP script picks up the name of every input tag, including the hidden
    > field (like it should) but for some reason, the value that was written
    > to the hidden field is not passed to the server. Thus, for the PHP folk
    > reading this post, my hidden input field is called mylist and
    > $_POST['mylist'] exists, but its empty. Even though before processing,
    > I could visably see the input in the box (for debugging remember, I made
    > the input tag box a normal, unhidden one).
    >
    > Here is what I have done to try and resolve:
    > - I have used both Mozilla 1.7.5 and IE6 - both provide same results -
    > my hidden field name gets passed, but not its value.
    >
    > - I have created another hidden field and given it a default value ie I
    > have <input type="hidden" name="extraone" value="xyz"> and I get
    > $_POST['extraone']="xyz" passed to my php server, like I would expect -
    > however, the value of mylist is sent empty, even though it has data.
    >
    > - I have even put in a javascript alert box just before the form is sent
    > to the server and can see the result in my (unhidden) box, and the same
    > value displayed in the javascript alert - but again, the value of the
    > mylist does not get sent to the server.
    >
    >
    > The only difference is that my hidden field (even if its displayed like
    > an ordinary text input box) does not post data written to form fields as
    > the result of a javascript function. Interestingly though, the server
    > does know about the input tag box since it does receive
    > $_POST['mylist'], it justs receives it empty.
    >
    > What gives? If the form reads my input from one field, and writes it to
    > another field, then it should be sent to the server, true?
    >
    > Also... my tags are all inside my <form></form> tag (which is proven by
    > double checking, and the fact that I do get the input tag box name sent
    > to my server).
    >
    > Since I can see the data values in the box, it tells me my javascript is
    > doing what it should be doing - so I don't see any point in including my
    > javascript (though I have no problems doing so if someone requests
    > it). On the php server, I am using a simple phpinfo(); to check the
    > data is being received...
    >
    > Has anybody got any ideas on this one? I'm tired racking my brains on
    > this one - I just might go to bed and try a fresh approach after a few
    > hours sleep...
    >
    > Thanks in advance,
    > Randell D
    >[/color]

    One last point - If I manually write data in to the input tag field
    named mylist, and post, then that value does get sent to the server -
    however if javascript gives mylist a value, then it does not get sent to
    the server.

    Does anyone have any ideas?

    randelld

    Comment

    • Dag Sunde

      #3
      Re: Odd problem: Data from hidden field is not sent to server...

      "Randell D." <reply.via.news .group.only.tha nks@fiprojects. moc> wrote in
      message news:lC_Nd.3214 23$8l.315942@pd 7tw1no...[color=blue]
      > Randell D. wrote:
      >[color=green]
      > >
      > > Folks,
      > >
      > > Perhaps someone can figure this out - this is 'the process of my script'
      > >
      > > I have a form whereby I can add multiple contacts to a single address.
      > > There is only one firstname/lastname/telephone box - when the user
      > > clicks the add button, I read the values from the form fields and
      > > record them into a hidden text input field. This part works because
      > > during debugging, I have converted the <input type=hidden> into a <input
      > > type=text> to visably confirm my data is being copied into the 'hidden'
      > > field.
      > >[/color][/color]
      <snipped/>[color=blue][color=green]
      > > Since I can see the data values in the box, it tells me my javascript is
      > > doing what it should be doing - so I don't see any point in including my
      > > javascript (though I have no problems doing so if someone requests
      > > it). On the php server, I am using a simple phpinfo(); to check the
      > > data is being received...
      > >
      > > Has anybody got any ideas on this one? I'm tired racking my brains on
      > > this one - I just might go to bed and try a fresh approach after a few
      > > hours sleep...
      > >
      > > Thanks in advance,
      > > Randell D
      > >[/color]
      >
      > One last point - If I manually write data in to the input tag field
      > named mylist, and post, then that value does get sent to the server -
      > however if javascript gives mylist a value, then it does not get sent to
      > the server.[/color]

      Then we must see the actual javascript code that gives mylist a value.

      --
      Dag.


      Comment

      • micha

        #4
        Re: Odd problem: Data from hidden field is not sent to server...


        Randell D. wrote:[color=blue]
        > Randell D. wrote:
        >[color=green]
        > >
        > > Folks,
        > >
        > > Perhaps someone can figure this out - this is 'the process of my[/color][/color]
        script'[color=blue][color=green]
        > >
        > > I have a form whereby I can add multiple contacts to a single[/color][/color]
        address.[color=blue][color=green]
        > > There is only one firstname/lastname/telephone box - when the user
        > > clicks the add button, I read the values from the form fields and
        > > record them into a hidden text input field. This part works[/color][/color]
        because[color=blue][color=green]
        > > during debugging, I have converted the <input type=hidden> into a[/color][/color]
        <input[color=blue][color=green]
        > > type=text> to visably confirm my data is being copied into the[/color][/color]
        'hidden'[color=blue][color=green]
        > > field.
        > >
        > > Once the user has entered in one or more names, they can click[/color][/color]
        another[color=blue][color=green]
        > > button and submit the form for processing. My idea is that I would[/color][/color]
        then[color=blue][color=green]
        > > parse this hidden field server side...
        > >
        > > I have a WAMPHP based server and as a test, I dump out my entire[/color][/color]
        $_POST[color=blue][color=green]
        > > (basically, the name and value in every INPUT tag).
        > >
        > > My PHP script picks up the name of every input tag, including the[/color][/color]
        hidden[color=blue][color=green]
        > > field (like it should) but for some reason, the value that was[/color][/color]
        written[color=blue][color=green]
        > > to the hidden field is not passed to the server. Thus, for the PHP[/color][/color]
        folk[color=blue][color=green]
        > > reading this post, my hidden input field is called mylist and
        > > $_POST['mylist'] exists, but its empty. Even though before[/color][/color]
        processing,[color=blue][color=green]
        > > I could visably see the input in the box (for debugging remember, I[/color][/color]
        made[color=blue][color=green]
        > > the input tag box a normal, unhidden one).
        > >
        > > Here is what I have done to try and resolve:
        > > - I have used both Mozilla 1.7.5 and IE6 - both provide same[/color][/color]
        results -[color=blue][color=green]
        > > my hidden field name gets passed, but not its value.
        > >
        > > - I have created another hidden field and given it a default value[/color][/color]
        ie I[color=blue][color=green]
        > > have <input type="hidden" name="extraone" value="xyz"> and I get
        > > $_POST['extraone']="xyz" passed to my php server, like I would[/color][/color]
        expect -[color=blue][color=green]
        > > however, the value of mylist is sent empty, even though it has[/color][/color]
        data.[color=blue][color=green]
        > >
        > > - I have even put in a javascript alert box just before the form is[/color][/color]
        sent[color=blue][color=green]
        > > to the server and can see the result in my (unhidden) box, and the[/color][/color]
        same[color=blue][color=green]
        > > value displayed in the javascript alert - but again, the value of[/color][/color]
        the[color=blue][color=green]
        > > mylist does not get sent to the server.
        > >
        > >
        > > The only difference is that my hidden field (even if its displayed[/color][/color]
        like[color=blue][color=green]
        > > an ordinary text input box) does not post data written to form[/color][/color]
        fields as[color=blue][color=green]
        > > the result of a javascript function. Interestingly though, the[/color][/color]
        server[color=blue][color=green]
        > > does know about the input tag box since it does receive
        > > $_POST['mylist'], it justs receives it empty.
        > >
        > > What gives? If the form reads my input from one field, and writes[/color][/color]
        it to[color=blue][color=green]
        > > another field, then it should be sent to the server, true?
        > >
        > > Also... my tags are all inside my <form></form> tag (which is[/color][/color]
        proven by[color=blue][color=green]
        > > double checking, and the fact that I do get the input tag box name[/color][/color]
        sent[color=blue][color=green]
        > > to my server).
        > >
        > > Since I can see the data values in the box, it tells me my[/color][/color]
        javascript is[color=blue][color=green]
        > > doing what it should be doing - so I don't see any point in[/color][/color]
        including my[color=blue][color=green]
        > > javascript (though I have no problems doing so if someone requests[/color][/color]
        [color=blue][color=green]
        > > it). On the php server, I am using a simple phpinfo(); to check[/color][/color]
        the[color=blue][color=green]
        > > data is being received...
        > >
        > > Has anybody got any ideas on this one? I'm tired racking my brains[/color][/color]
        on[color=blue][color=green]
        > > this one - I just might go to bed and try a fresh approach after a[/color][/color]
        few[color=blue][color=green]
        > > hours sleep...
        > >
        > > Thanks in advance,
        > > Randell D
        > >[/color]
        >
        > One last point - If I manually write data in to the input tag field
        > named mylist, and post, then that value does get sent to the server -[/color]
        [color=blue]
        > however if javascript gives mylist a value, then it does not get sent[/color]
        to[color=blue]
        > the server.
        >
        > Does anyone have any ideas?
        >
        > randelld[/color]


        would be good to see the code...

        and: what kind of value do you assign to your hidden field?

        micha

        Comment

        • Randell D.

          #5
          Re: Odd problem: Data from hidden field is not sent to server...

          Randell D. wrote:[color=blue]
          > Randell D. wrote:
          >[color=green]
          >>
          >> Folks,
          >>
          >> Perhaps someone can figure this out - this is 'the process of my script'
          >>
          >> I have a form whereby I can add multiple contacts to a single address.
          >> There is only one firstname/lastname/telephone box - when the user
          >> clicks the add button, I read the values from the form fields and
          >> record them into a hidden text input field. This part works because
          >> during debugging, I have converted the <input type=hidden> into a
          >> <input type=text> to visably confirm my data is being copied into the
          >> 'hidden' field.
          >>
          >> Once the user has entered in one or more names, they can click another
          >> button and submit the form for processing. My idea is that I would
          >> then parse this hidden field server side...
          >>
          >> I have a WAMPHP based server and as a test, I dump out my entire
          >> $_POST (basically, the name and value in every INPUT tag).
          >>
          >> My PHP script picks up the name of every input tag, including the
          >> hidden field (like it should) but for some reason, the value that was
          >> written to the hidden field is not passed to the server. Thus, for
          >> the PHP folk reading this post, my hidden input field is called mylist
          >> and $_POST['mylist'] exists, but its empty. Even though before
          >> processing, I could visably see the input in the box (for debugging
          >> remember, I made the input tag box a normal, unhidden one).
          >>
          >> Here is what I have done to try and resolve:
          >> - I have used both Mozilla 1.7.5 and IE6 - both provide same results -
          >> my hidden field name gets passed, but not its value.
          >>
          >> - I have created another hidden field and given it a default value ie
          >> I have <input type="hidden" name="extraone" value="xyz"> and I get
          >> $_POST['extraone']="xyz" passed to my php server, like I would expect
          >> - however, the value of mylist is sent empty, even though it has data.
          >>
          >> - I have even put in a javascript alert box just before the form is
          >> sent to the server and can see the result in my (unhidden) box, and
          >> the same value displayed in the javascript alert - but again, the
          >> value of the mylist does not get sent to the server.
          >>
          >>
          >> The only difference is that my hidden field (even if its displayed
          >> like an ordinary text input box) does not post data written to form
          >> fields as the result of a javascript function. Interestingly though,
          >> the server does know about the input tag box since it does receive
          >> $_POST['mylist'], it justs receives it empty.
          >>
          >> What gives? If the form reads my input from one field, and writes it
          >> to another field, then it should be sent to the server, true?
          >>
          >> Also... my tags are all inside my <form></form> tag (which is proven
          >> by double checking, and the fact that I do get the input tag box name
          >> sent to my server).
          >>
          >> Since I can see the data values in the box, it tells me my javascript
          >> is doing what it should be doing - so I don't see any point in
          >> including my javascript (though I have no problems doing so if
          >> someone requests it). On the php server, I am using a simple
          >> phpinfo(); to check the data is being received...
          >>
          >> Has anybody got any ideas on this one? I'm tired racking my brains on
          >> this one - I just might go to bed and try a fresh approach after a few
          >> hours sleep...
          >>
          >> Thanks in advance,
          >> Randell D
          >>[/color]
          >
          > One last point - If I manually write data in to the input tag field
          > named mylist, and post, then that value does get sent to the server -
          > however if javascript gives mylist a value, then it does not get sent to
          > the server.
          >
          > Does anyone have any ideas?
          >
          > randelld[/color]


          Dag / Micha,

          I've copied the code to



          The application is for an intranet and thus not visable to the
          internet... Let us know if you can put any light on it...

          Thanks...
          Randell D.

          Comment

          • Geoff Berrow

            #6
            Re: Odd problem: Data from hidden field is not sent to server...

            I noticed that Message-ID: <Nu_Nd.322273$6 l.46322@pd7tw2n o> from Randell
            D. contained the following:
            [color=blue]
            >Has anybody got any ideas on this one? I'm tired racking my brains on
            >this one - I just might go to bed and try a fresh approach after a few
            >hours sleep...[/color]

            Well, as you might expect in a PHP group, my idea would be to dump
            JavaScript and get PHP to write the hidden fields.
            I did something similar for lesson 5 of my PHP course
            See http://www.ckdog.co.uk/phpcourse/Names2.php and for the code



            --
            Geoff Berrow (put thecat out to email)
            It's only Usenet, no one dies.
            My opinions, not the committee's, mine.
            Simple RFDs http://www.ckdog.co.uk/rfdmaker/

            Comment

            • Randell D.

              #7
              Re: Odd problem: Data from hidden field is not sent to server...

              Geoff Berrow wrote:[color=blue]
              > I noticed that Message-ID: <Nu_Nd.322273$6 l.46322@pd7tw2n o> from Randell
              > D. contained the following:
              >
              >[color=green]
              >>Has anybody got any ideas on this one? I'm tired racking my brains on
              >>this one - I just might go to bed and try a fresh approach after a few
              >>hours sleep...[/color]
              >
              >
              > Well, as you might expect in a PHP group, my idea would be to dump
              > JavaScript and get PHP to write the hidden fields.
              > I did something similar for lesson 5 of my PHP course
              > See http://www.ckdog.co.uk/phpcourse/Names2.php and for the code
              > http://www.ckdog.co.uk/phpcourse/Names2.phps
              >
              >[/color]

              No - You have done something different - My approach means I do not know
              the names - The end user enters the names from the client - Instead of
              them posting several names to the server, I wanted to store the names
              ina hidden box - then when they are finished,they could submit the form
              posting the list of names in a hidden box to the server (thus, a single
              post for what could be five, ten or twenty names). I made my hidden box
              a normal input type=text box and could see my javascript was writing the
              names into the box just fine however when I would post the form,
              $_POST would have the input field name, but no value.

              I think I'll create a quick page and put it up on the net as my ISP
              gives me PHP on a Linux box - If the problem fails to repeat itself
              there, then it sounds like its a windoze/php based server problem (I
              develope on a windoze xp platform but will deliver my code to a linux box).

              thanks for the suggestion though...
              randelld

              Comment

              • Randell D.

                #8
                Re: Odd problem: Data from hidden field is not sent to server...

                Randell D. wrote:
                [color=blue]
                > Randell D. wrote:
                >[color=green]
                >>
                >> Folks,
                >>
                >> Perhaps someone can figure this out - this is 'the process of my script'
                >>
                >> I have a form whereby I can add multiple contacts to a single address.
                >> There is only one firstname/lastname/telephone box - when the user
                >> clicks the add button, I read the values from the form fields and
                >> record them into a hidden text input field. This part works because
                >> during debugging, I have converted the <input type=hidden> into a
                >> <input type=text> to visably confirm my data is being copied into the
                >> 'hidden' field.
                >>
                >> Once the user has entered in one or more names, they can click another
                >> button and submit the form for processing. My idea is that I would
                >> then parse this hidden field server side...
                >>
                >> I have a WAMPHP based server and as a test, I dump out my entire
                >> $_POST (basically, the name and value in every INPUT tag).
                >>
                >> My PHP script picks up the name of every input tag, including the
                >> hidden field (like it should) but for some reason, the value that was
                >> written to the hidden field is not passed to the server. Thus, for
                >> the PHP folk reading this post, my hidden input field is called mylist
                >> and $_POST['mylist'] exists, but its empty. Even though before
                >> processing, I could visably see the input in the box (for debugging
                >> remember, I made the input tag box a normal, unhidden one).
                >>
                >> Here is what I have done to try and resolve:
                >> - I have used both Mozilla 1.7.5 and IE6 - both provide same results -
                >> my hidden field name gets passed, but not its value.
                >>
                >> - I have created another hidden field and given it a default value ie
                >> I have <input type="hidden" name="extraone" value="xyz"> and I get
                >> $_POST['extraone']="xyz" passed to my php server, like I would expect
                >> - however, the value of mylist is sent empty, even though it has data.
                >>
                >> - I have even put in a javascript alert box just before the form is
                >> sent to the server and can see the result in my (unhidden) box, and
                >> the same value displayed in the javascript alert - but again, the
                >> value of the mylist does not get sent to the server.
                >>
                >>
                >> The only difference is that my hidden field (even if its displayed
                >> like an ordinary text input box) does not post data written to form
                >> fields as the result of a javascript function. Interestingly though,
                >> the server does know about the input tag box since it does receive
                >> $_POST['mylist'], it justs receives it empty.
                >>
                >> What gives? If the form reads my input from one field, and writes it
                >> to another field, then it should be sent to the server, true?
                >>
                >> Also... my tags are all inside my <form></form> tag (which is proven
                >> by double checking, and the fact that I do get the input tag box name
                >> sent to my server).
                >>
                >> Since I can see the data values in the box, it tells me my javascript
                >> is doing what it should be doing - so I don't see any point in
                >> including my javascript (though I have no problems doing so if
                >> someone requests it). On the php server, I am using a simple
                >> phpinfo(); to check the data is being received...
                >>
                >> Has anybody got any ideas on this one? I'm tired racking my brains on
                >> this one - I just might go to bed and try a fresh approach after a few
                >> hours sleep...
                >>
                >> Thanks in advance,
                >> Randell D
                >>[/color]
                >
                > One last point - If I manually write data in to the input tag field
                > named mylist, and post, then that value does get sent to the server -
                > however if javascript gives mylist a value, then it does not get sent to
                > the server.
                >
                > Does anyone have any ideas?
                >
                > randelld[/color]

                Some progress...

                I created a new dummy form to perform the same process, from scratch
                except I'm using the original javascript function - untouched.

                For some reason, the code works for me... so I gather my javascript
                function is fine but somehow, my html code has a bad tag or something in
                it...

                I will work on it a little more... thanks though
                randelld

                Comment

                • Geoff Berrow

                  #9
                  Re: Odd problem: Data from hidden field is not sent to server...

                  I noticed that Message-ID: <K68Od.329911$6 l.102894@pd7tw2 no> from
                  Randell D. contained the following:
                  [color=blue]
                  >No - You have done something different - My approach means I do not know
                  >the names - The end user enters the names from the client - Instead of
                  >them posting several names to the server, I wanted to store the names
                  >ina hidden box - then when they are finished,they could submit the form
                  >posting the list of names in a hidden box to the server (thus, a single
                  >post for what could be five, ten or twenty names).[/color]

                  Well it could easily be adapted.

                  I'd normally frown on an exclusively Javascript solution but as it's an
                  intranet you have control over that. Equally, as it's an intranet,
                  multiple server calls are no major problem either.

                  If you go the Jave Script route, though it's possible someone else knows
                  the solution, you'd obviously be better off asking in a JS group

                  --
                  Geoff Berrow (put thecat out to email)
                  It's only Usenet, no one dies.
                  My opinions, not the committee's, mine.
                  Simple RFDs http://www.ckdog.co.uk/rfdmaker/

                  Comment

                  • Randell D.

                    #10
                    Re: Odd problem: Data from hidden field is not sent to server...

                    Geoff Berrow wrote:[color=blue]
                    > I noticed that Message-ID: <K68Od.329911$6 l.102894@pd7tw2 no> from
                    > Randell D. contained the following:
                    >
                    >[color=green]
                    >>No - You have done something different - My approach means I do not know
                    >>the names - The end user enters the names from the client - Instead of
                    >>them posting several names to the server, I wanted to store the names
                    >>ina hidden box - then when they are finished,they could submit the form
                    >>posting the list of names in a hidden box to the server (thus, a single
                    >>post for what could be five, ten or twenty names).[/color]
                    >
                    >
                    > Well it could easily be adapted.
                    >
                    > I'd normally frown on an exclusively Javascript solution but as it's an
                    > intranet you have control over that. Equally, as it's an intranet,
                    > multiple server calls are no major problem either.
                    >
                    > If you go the Jave Script route, though it's possible someone else knows
                    > the solution, you'd obviously be better off asking in a JS group
                    >[/color]

                    Thanks Geoff... but... I errrummaaaa... had copied both comp.lang.php
                    and comp.lang.javas cript into my OP to ensure I covered my bases

                    thanks
                    randelld

                    Comment

                    • Randell D.

                      #11
                      Re: Odd problem: Data from hidden field is not sent to server...

                      Randell D. wrote:
                      [color=blue]
                      >
                      > Folks,
                      >
                      > Perhaps someone can figure this out - this is 'the process of my script'
                      >
                      > I have a form whereby I can add multiple contacts to a single address.
                      > There is only one firstname/lastname/telephone box - when the user
                      > clicks the add button, I read the values from the form fields and
                      > record them into a hidden text input field. This part works because
                      > during debugging, I have converted the <input type=hidden> into a <input
                      > type=text> to visably confirm my data is being copied into the 'hidden'
                      > field.
                      >
                      > Once the user has entered in one or more names, they can click another
                      > button and submit the form for processing. My idea is that I would then
                      > parse this hidden field server side...
                      >
                      > I have a WAMPHP based server and as a test, I dump out my entire $_POST
                      > (basically, the name and value in every INPUT tag).
                      >
                      > My PHP script picks up the name of every input tag, including the hidden
                      > field (like it should) but for some reason, the value that was written
                      > to the hidden field is not passed to the server. Thus, for the PHP folk
                      > reading this post, my hidden input field is called mylist and
                      > $_POST['mylist'] exists, but its empty. Even though before processing,
                      > I could visably see the input in the box (for debugging remember, I made
                      > the input tag box a normal, unhidden one).
                      >
                      > Here is what I have done to try and resolve:
                      > - I have used both Mozilla 1.7.5 and IE6 - both provide same results -
                      > my hidden field name gets passed, but not its value.
                      >
                      > - I have created another hidden field and given it a default value ie I
                      > have <input type="hidden" name="extraone" value="xyz"> and I get
                      > $_POST['extraone']="xyz" passed to my php server, like I would expect -
                      > however, the value of mylist is sent empty, even though it has data.
                      >
                      > - I have even put in a javascript alert box just before the form is sent
                      > to the server and can see the result in my (unhidden) box, and the same
                      > value displayed in the javascript alert - but again, the value of the
                      > mylist does not get sent to the server.
                      >
                      >
                      > The only difference is that my hidden field (even if its displayed like
                      > an ordinary text input box) does not post data written to form fields as
                      > the result of a javascript function. Interestingly though, the server
                      > does know about the input tag box since it does receive
                      > $_POST['mylist'], it justs receives it empty.
                      >
                      > What gives? If the form reads my input from one field, and writes it to
                      > another field, then it should be sent to the server, true?
                      >
                      > Also... my tags are all inside my <form></form> tag (which is proven by
                      > double checking, and the fact that I do get the input tag box name sent
                      > to my server).
                      >
                      > Since I can see the data values in the box, it tells me my javascript is
                      > doing what it should be doing - so I don't see any point in including my
                      > javascript (though I have no problems doing so if someone requests
                      > it). On the php server, I am using a simple phpinfo(); to check the
                      > data is being received...
                      >
                      > Has anybody got any ideas on this one? I'm tired racking my brains on
                      > this one - I just might go to bed and try a fresh approach after a few
                      > hours sleep...
                      >
                      > Thanks in advance,
                      > Randell D
                      >[/color]

                      Sorted it!

                      It was a self induced PHP problem!

                      I have a function that sanitizes my form data - Part of the function
                      includes the escaping of special characters while another part ensures
                      no one input tag field is longer than 50characters in length... because
                      mylist was, it was being cleared...

                      Silly of me really... but glad for the help from everyone anyway...

                      randelld

                      Comment

                      Working...