SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    PHP warrior dkode's Avatar
    Join Date
    Sep 2001
    Location
    Planet Namek
    Posts
    329
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Refrence a variable?

    I know this is a simple answer but my mind is blank..

    I have multiple fields each with the name:
    quantity_ID

    where id is equal to a unique number

    Now, once i submit the form how would i access these variables? Currently i have a foreach loop with all of the ID's. lets say i wanted to dump what quantity they submitted into a new variable, how would I do so? i know i've done this before but i just don't remember how now...

    I think it was something like:
    $[quantity_$id] or something like that?
    "Mankind cannot define memory, yet it defines mankind"
    -- Project 2501, Ghost in the Shell

    Smarty | PEAR | PHP Manual | MySQL Manual

  2. #2
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    not sure if i understand, but if quantity is submitted through the form, use $HTTP_POST_VARS['quantity_id'] or if register globals is on just use $quantity_id
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*


Bookmarks

Posting Permissions

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