I don't get any values for my checkboxes

My code will not print out any values for my checkboxes. It only shows the two checkboxes side-by-side. Any suggestions?

[code]<?php
$lines = file(‘test_read.txt’);

foreach ($lines as $line) {
list($fields, $values) = explode("=", $line);

$fields = explode(",", $fields);
$values = explode(",", $values);

for ($i=0; $i<count($fields); $i++) {

    switch(trim($fields[$i])) {

        case 'checkbox':
            print ("<input type="checkbox" name="userbox" value="".trim($value[$i])."">".trim($value[$i])."");
            break;

        case 'radio':
            print ("<input type="radio" name="userbox" value="".trim($value[$i])."">".trim($value[$i])."");
            break;

    }
}

}
?>[/code]

Please keep the topic in the initial threadfor clarity.

This topic is locked.

Sponsor our Newsletter | Privacy Policy | Terms of Service