Im not sure about how to do this in php, but I have a list of checkmarks on one page then you select the checkmarks you want and hit submit, will I then submit off to a second page were I would like to take the results of the checkmarks and do somthing with them. Problem is on the first page I have php generate the checkbox's so each checkbox has a name of "checkbox"
How can I get the values of these check box's if there all the same name? I think I might have to use a array or somthing..
here is what I have so far
<?
function getDirList ($dirName) {
$d = dir($dirName);
while($entry = $d->read()) {
if ($entry != "." && $entry != ".." && $entry != "index.php") {
if (is_dir($dirName."/".$entry)) {
getDirList($dirName."/".$entry);
} else {
echo $dirName."/".$entry."<br>";
}
}
}
$d->close();
}
function getDirList_win ($dirName) {
$d = dir($dirName);
while($entry = $d->read()) {
if ($entry != "." && $entry != ".." && $entry != "index.php") {
if (is_dir($dirName."\\".$entry)) {
getDirList($dirName."\\".$entry);
} else {
?>
<input type="checkbox" name="checkbox" value="<? echo $entry; ?>">
<?
echo $dirName."\\".$entry."<br>";
}
}
}
$d->close();
}
if ($_REQUEST["Submit"] == "Submit") {
//Get Checkbox's
echo $_REQUEST["checkbox"];
return;
}
?>
<form name="org" method="post" action="<? echo $PHP_SELF; ?>">
<?
getDirList_win ("images");
?>
<br>
Select Category:
<select name="select">
<option selected>Chairs</option>
<option>Tables</option>
<option>Assesories</option>
<option>Cheesecakes</option>
</select>
<br>
<br>
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Submit2" value="Reset">
</form>