CrazyEngineers
  • How to handle variable number of request parameters in PHP (or any other server side script) ?

    Updated: Oct 24, 2024
    Views: 947
    To quote a familiar example, consider uploading multiple photos in facebook:

    We upload a random number of photos, and after upload they all show up in the same page. We can add captions to any or all of them. And this is all saved together.

    Now consider how the request is sent when we hit the 'Save' button.
    If each picture has, say, 2 features (caption, location) and there are N pictures, 2*N POST/GET variables are sent to the server.

    My question is, how to properly handle such variable number of parameters by properly distinguishing them?

    Here is a better example:
    Consider all photos in an album are displayed. We can tick any or all of the photos and hit delete. So how do we determine which images are ticked efficiently at the server side?

    (Hope the question is clear!)
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Home Channels Search Login Register