Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2002
    Location
    Burnaby
    Posts
    5

    Unanswered: php and big-ass forms

    Hey guys, I'm new here, and the nature of my problem has led me to write this message, so here goes:

    I am creating a php/mySQL web app and what i have inmplemented is a super huge inventory ordering system for a local wholesaler. The thing is, according to their spec I have to list EVERY item that they carry on ONE page (don't ask).

    Anyhow, beside each item, there is an input field where customers can enter in the quantity of what they need, and then eventualyl hit submit to post the transaction to the wholesaler.

    Now, What i can do here is a simple action script defined in the form tags and process the values on the server, but I would liek to avoid having to transmit all the zeros that will inevitably show up on an order.

    Essentially, if I have, say 200 fields of which only 10 are filled with non-zero, how can I, on the client-side determine that only those 10 fields need to be transmitted?

    lol.. thanks if anybody knows this.

    (Do i have to use javascript, or can php do this)

  2. #2
    Join Date
    Jul 2002
    Location
    Burnaby
    Posts
    5
    d'oh my spelling sucks. haha

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    you don't have to use javascript, but you could, although it would be very messy

    you would still have to handle the situation on the server side when a non-javascript user submits the form... in other words, don't bother trying to limit the submitted fields

    and yes, you could use php, but since it's server-side, you wouldn't limit the number of fields sent in the form, you just use php to check for zeroes...

    rudy
    http://rudy.ca/

  4. #4
    Join Date
    Jul 2002
    Location
    Burnaby
    Posts
    5
    a'ight, well, what i'm trying to avoid is sending every field over the line as that could take awhile, especially since some of their customers are on 56k. propogation sucks.

    BUt yeah, I'm trying to do javascript at the moment and it seems to be that it _WILL_ be messy as you said. I suppose I'll just send it all and say screw it.

    i'll delete the zeros on the server. :P

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •