Announcement

Collapse
No announcement yet.

how to pass arrays w/register_globals = on????

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Gordon Werner
    replied
    thanks for your assistance!

    Originally posted by Scott MacVicar
    would be $_POST['ItemA'][0] and [1] and so forth, you can use

    echo '<pre>';
    print_r($_POST['ItemA']);
    echo '</pre>';

    to look at whats held and what key to use to access it.

    Leave a comment:


  • Scott MacVicar
    replied
    Originally posted by Gordon Werner
    Hi there ...

    I need to pass 3 arrays through a form submit (POST, to the same page) and I have register_globals = on.

    How does one pass the array data?

    the form fields are all set up as

    <input type="radio" name="$ItemA[]">
    <input type="radio" name="$ItemB[]">
    <input type="radio" name="$ItemC[]">

    I thought that when the form was posted you could get the values by doing:

    $ItemA[] = $_POST['ItemA'][''];
    $ItemB[] = $_POST['ItemB'][''];
    $ItemC[] = $_POST['ItemC'][''];

    but this does not seem to work ...

    Can somebody please clue me in as to how I do this correctly?

    Thanks

    Gordon
    would be $_POST['ItemA'][0] and [1] and so forth, you can use

    echo '<pre>';
    print_r($_POST['ItemA']);
    echo '</pre>';

    to look at whats held and what key to use to access it.

    Leave a comment:


  • Gordon Werner
    started a topic how to pass arrays w/register_globals = on????

    how to pass arrays w/register_globals = on????

    Hi there ...

    I need to pass 3 arrays through a form submit (POST, to the same page) and I have register_globals = on.

    How does one pass the array data?

    the form fields are all set up as

    <input type="radio" name="$ItemA[]">
    <input type="radio" name="$ItemB[]">
    <input type="radio" name="$ItemC[]">

    I thought that when the form was posted you could get the values by doing:

    $ItemA[] = $_POST['ItemA'][''];
    $ItemB[] = $_POST['ItemB'][''];
    $ItemC[] = $_POST['ItemC'][''];

    but this does not seem to work ...

    Can somebody please clue me in as to how I do this correctly?

    Thanks

    Gordon

Related Topics

Collapse

Working...
X