function checkval($a, $b) {
if ($a = "1") {
echo "$b ";
} else {
return false;
}
}
I created this just minute ago...
I want it to check this submit:
Fet
<input type="checkbox" name="fet" value="1">
Tölt
<input type="checkbox" name="tolt" value="1">
Brokk
<input type="checkbox" name="brokk" value="1">
Stökk
<input type="checkbox" name="stokk" value="1">
Skeið
<input type="checkbox" name="skeid" value="1">
When this i submitted the info goes to another document, which performs this:
if ($fet || $tolt || $brokk || $stokk || $skeid) {
checkval($fet, Fet);
checkval($tolt, Tölt);
checkval($brokk, Brokk);
checkval($stokk, Stökk);
checkval($skeid, Skeið);
} else {
echo "<b>ERROR:</b> Veldu gangtegund.";
}
What am I doing wrong? I get all echoed, not just selected onces... Please help.
Thanks in advance.. Arni