Form med radiobuttons

Tags:    php

jeg har lavet en temmelig stor form

og fandt ud af at checkbokse ikke var det jeg skulle bruge. så jeg lavede den med radiobuttons istedet.

mit problem er bare at man stadig kan markere alle buttons?

nogen der kan sige hvorfor?


<form action="index.php" method="post">
<table border="1" width="100%" style="font-size: 10pt" style="background-color:#cccccc">
<tr><input type="hidden" name="senddata" value="ok">
<td align="center" colspan="2"> Vælg Søge Kriterier</td>
</tr>
<tr><td>
<table>
<tr><td><input type="radio" name="proeff" value="1">Produktions Effektivitet</td></tr><tr>
<td><input type="radio" name="medeff" value="2">Medarbejder Effektivitet</td></tr><tr>
<td><input type="radio" name="prokva" value="4">Produktions Kvalitet</td></tr><tr>
<td><input type="radio" name="tryk" value="8">Tryk</td></tr><tr>
<td><input type="radio" name="materiale" value="16">Materiale Forbrug</td></tr><tr>
<td><input type="radio" name="temp" value="32">Temperature</td></tr><tr>
<td><input type="radio" name="flow" value="64">Flow</td></tr><tr>
<td><input type="radio" name="ordre" value="128">Ordre Status</td></tr>
</table>
</td><td>
<table>
<tr><td><select name="proqty" size="1">
<option value="" width="50"></option>
<option value="0" width="50">> 0</option>
<option value="50" width="50">> 50</option>
<option value="100" width="50">> 100</option>
<option value="150" width="50">> 150</option>
<option value="200" width="50">> 200</option>
</select></td></tr><tr>
<td><select name="brugere" size="1">
<option value="" width="50"></option>
<?php

$listen = domysql("SELECT * FROM alm_brugere");
while(list($alm_bruger_id,$alm_bruger_nr,$alm_bruger_navn,$alm_bruger_pass) = mysql_fetch_row($listen)) {

print "<option value=\\"$alm_bruger_id\\" width=\\"50\\">$alm_bruger_navn</option>";
}?>

</select></td></tr>

<tr>
<td><select name="prokvatype" size="1">
<option value="" width="50"></option>
<option value="typea" width="50">Type A </option>
<option value="typeb" width="50">Type B </option>
<option value="typec" width="50">Type C </option>
<option value="type2" width="50"> 2.sort </option>
<option value="typeskrot" width="50">Skrot </option>
<option value="typetest" width="50">TestSkud </option>
</select></td>

<td><select name="prokvavaerdi" size="1">
<option value="" width="50"></option>
<option value="0" width="50">> 0%</option>
<option value="25" width="50">> 25%</option>
<option value="50" width="50">> 50%</option>
<option value="75" width="50">> 75%</option>
</select></td>
</tr>

<tr>
<td><select name="tryktype" size="1">
<option value="" width="50"></option>
<option value="iso" width="50">ISO</option>
<option value="poly" width="50">POLY</option>
</select></td>
<td><select name="trykvaerdi" size="1">
<option value="" width="50"></option>
<option value="0" width="50">> 0Bar</option>
<option value="100" width="50">> 100 Bar</option>
<option value="150" width="50">> 150 Bar</option>
<option value="200" width="50">> 200 Bar</option>
</select></td>
</tr>

<tr>
<td><select name="mattype" size="1">
<option value="" width="50"></option>
<option value="iso" width="50">ISO</option>
<option value="poly" width="50">POLY</option>
</select></td>
</tr>

<tr>
<td><select name="temptype" size="1">
<option value="" width="50"></option>
<option value="iso" width="50">ISO</option>
<option value="poly" width="50">POLY</option>
</select></td>
<td><select name="tempvaerdi" size="1">
<option value="" width="50"></option>
<option value="0" width="50">> 0 C</option>
<option value="10" width="50">> 10 C</option>
<option value="25" width="50">> 25 C</option>
<option value="50" width="50">> 50 C</option>
<option value="75" width="50">> 75 C</option>
<option value="100" width="50">> 100 C</option>
</select></td></tr>
<tr>
<td><select name="flowtype" size="1">
<option value="" width="50"></option>
<option value="iso" width="50">ISO</option>
<option value="poly" width="50">POLY</option>
</select></td>
<td><select name="flowvaerdi" size="1">
<option value="" width="50"></option>
<option value="0" width="50">> 0 g/sek</option>
<option value="10" width="50">> 10 g/sek</option>
<option value="50" width="50">> 50 g/sek</option>
<option value="150" width="50">> 150 g/sek</option>
<option value="200" width="50">> 200 g/sek</option>
<option value="250" width="50">> 250 g/sek</option>
</select></td>
</tr>
<tr>
<td><select name="ostatus" size="1">
<option value="" width="50"></option>
<option value="fardig" width="50">Færdige</option>
<option value="aktiv" width="50">Aktive</option>
<option value="pause" width="50">Pausede</option>
<option value="alle" width="50">Alle</option>
</select></td></tr>
</table>
</td></tr>
<tr>
<td>From: <select name="starttid" size="1">


<?php
$_SESSION['testdato']= 0;
$listen = domysql("SELECT * FROM skifteholddata ORDER BY UNIX_TIMESTAMP(datostart) DESC");
while(list($glemdet,$datostart) = mysql_fetch_row($listen)) {
if($_SESSION['testdato'] != $datostart){
print "<option value=\\"$datostart\\" width=\\"50\\">$datostart</option>";
}
$_SESSION['testdato'] = $datostart;

}?>

</select>
To: <select name="sluttid" size="1">

<?php
$_SESSION['testdato']= 0;
$listen = domysql("SELECT * FROM skifteholddata ORDER BY UNIX_TIMESTAMP(datoslut) DESC");
while(list($glemdet,$datoslut) = mysql_fetch_row($listen)) {
if($_SESSION['testdato'] != $datoslut){
print "<option value=\\"$datoslut\\" width=\\"50\\">$datoslut</option>";
}
$_SESSION['testdato'] = $datoslut;

}?>
</select></td>
<td align="center"><input type="submit" value="Søg"></td>
</tr>

</table>
</form>



~Life is to short for windows~



1 svar postet i denne tråd vises herunder
1 indlæg har modtaget i alt 2 karma
Sorter efter stemmer Sorter efter dato
fordi de har forskellige name-atributter. Giv dem det samme name og forskellig value

ps. sæt en så lang kode ind mellem [ p r e ] og [ / p r e ]

Fold kodeboks ind/udKode 


[Redigeret d. 03/06-04 12:30:38 af Jesper Kristensen]



t