PHP4 forms question

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

    #1

    PHP4 forms question

    Hello:

    I have a form in which I have checkboxes.
    Right now, I wrote the form's html and the php4 script.

    I use associative arrays in the form to capture the checkboxes
    that are checked.

    My html form puts the data in $info[] if the check box is checked.
    Part of my php4 script is as follows:
    ........
    $items = 3; //initialize possible # of items
    for ($i = 1; $i <= $items; $i++) { //loop on # of items
    $MailBody .= "$info[$i], ";
    .........

    The variable $MailBody always is null, no matter how many
    boxes I check in the form.!!
    In pHP4 script, How do I extract the data from that associative array?
    Do I need to use $_POST to capture the data from the associative array
    or can I access the associative array directly in the PHP4 script as I
    did above?
    Do I need to set any global variables for this to work?

    thank you for your help
Working...