this is how I have 2 checkbox and I do not want that you should only click on them simultaneously. it must only be possible to click on one at a time!. in the present to when I clicked the news, so it must enter a number in there to write "on". I would like to later be sure it is entered into the database.
the problem is that it appears to say "on" no matter what!?
<form action="#" method="post">
<table>
<tr>
<td>Emne</td>
<td>Vigtigt: <input type="checkbox" name="vigtigt" class="new"> Nyhede: <input type="checkbox" name="nyhede" class="new"></td>
</tr>
<tr>
<td>Title</td>
<td><input type="text" name="title" maxlength="50" class="new"></td>
</tr>
<tr>
<td>Tekst</td>
<td><textarea name="tekst" cols="20" rows="15" class="new"></textarea></td>
</tr>
<tr>
<td><input type="submit" name="opret" value="Opret Blog" class="new"></td>
<td></td>
</tr>
</table>
<?php
if(isset($_POST["opret"]))
{
if($_POST["vigtigt"] != "")
{
echo $_POST["vigtigt"];
echo "<br />";
echo $_POST["nyhede"];
}
elseif ($_POST["nyhede"] != "")
{
echo $_POST["vigtigt"];
echo "<br />";
echo $_POST["nyhede"];
}
else
{
echo "Fejl!";
}
}
?>
</form>