сега се избира категория с отметка
как мога да направя да може да се избере само 1 ?
или ще е по лесно да се направи с радио бутони?
<b>::. Категория:</b> <?php
if(strpos($c1, "1") !== false){print('<a href="category.php?id=1" class="a">Комедия</a> ');};
if(strpos($c2, "1") !== false){print('<a href="category.php?id=2" class="a">Трилър</a> ');};
if(strpos($c3, "1") !== false){print('<a href="category.php?id=3" class="a">Романтичен</a> ');};
if(strpos($c4, "1") !== false){print('<a href="category.php?id=4" class="a">Късометражен</a> ');};
if(strpos($c5, "1") !== false){print('<a href="category.php?id=5" class="a">Ужаси</a> ');};
if(strpos($c6, "1") !== false){print('<a href="category.php?id=6" class="a">Психо</a> ');};
if(strpos($c7, "1") !== false){print('<a href="category.php?id=7" class="a">Мистерия</a> ');};
if(strpos($c8, "1") !== false){print('<a href="category.php?id=8" class="a">Исторически</a> ');};
if(strpos($c9, "1") !== false){print('<a href="category.php?id=9" class="a">Документален</a> ');};
if(strpos($c10, "1") !== false){print('<a href="category.php?id=10" class="a">Семеен</a> ');};
if(strpos($c11, "1") !== false){print('<a href="category.php?id=11" class="a">Приключенски</a> ');};
if(strpos($c12, "1") !== false){print('<a href="category.php?id=12" class="a">Еротичeн</a> ');};
if(strpos($c13, "1") !== false){print('<a href="category.php?id=13" class="a">Драма</a> ');};
if(strpos($c14, "1") !== false){print('<a href="category.php?id=14" class="a">Уестърн</a> ');};
if(strpos($c15, "1") !== false){print('<a href="category.php?id=15" class="a">Екшън</a> ');};
if(strpos($c16, "1") !== false){print('<a href="category.php?id=16" class="a">Музикален</a> ');};
if(strpos($c17, "1") !== false){print('<a href="category.php?id=17" class="a">Криминален</a> ');};
if(strpos($c18, "1") !== false){print('<a href="category.php?id=18" class="a">Анимация</a> ');};
if(strpos($c19, "1") !== false){print('<a href="category.php?id=19" class="a">Фантастика</a> ');};
if(strpos($c20, "1") !== false){print('<a href="category.php?id=20" class="a">Детски</a> ');};
if(strpos($c21, "1") !== false){print('<a href="category.php?id=21" class="a">Сериал</a> ');};
if(strpos($c22, "1") !== false){print('<a href="category.php?id=22" class="a">Военен</a> ');};
if(strpos($c23, "1") !== false){print('<a href="category.php?id=23" class="a">Пародия</a> ');};
if(strpos($c24, "1") !== false){print('<a href="category.php?id=24" class="a">Друг</a> ');};
?><br />
ето и кода чрез който се записва
<td>Категория</td>
<td>
<?php
echo "
<table width=\"302\" border=\"0\" >
<tr>";
$i = "0";
$nared = "3";
$query = "SELECT * FROM janr";
$result = @mysql_query($query);
while ( $red = @mysql_fetch_array( $result )){
$ime = $red[name];
$id = $red[id];
$imeto1 = $red[imeto];
$i++;
$width = ceil(100/$nared);
echo "
<td width=\"1\"><input style=\"border: 0px;\" type=\"checkbox\" name=\"$id\" value=\"1\" />$ime
</td>";
if ($i == $nared){
echo "
</tr>
<tr>";
$i = 0;}}
echo "
<td colspan=\"3\">
</td>
</tr>
</table>";
?>
</td>
</tr>
<tr>
как мога да направя да може да се избере само 1 ?
или ще е по лесно да се направи с радио бутони?
<b>::. Категория:</b> <?php
if(strpos($c1, "1") !== false){print('<a href="category.php?id=1" class="a">Комедия</a> ');};
if(strpos($c2, "1") !== false){print('<a href="category.php?id=2" class="a">Трилър</a> ');};
if(strpos($c3, "1") !== false){print('<a href="category.php?id=3" class="a">Романтичен</a> ');};
if(strpos($c4, "1") !== false){print('<a href="category.php?id=4" class="a">Късометражен</a> ');};
if(strpos($c5, "1") !== false){print('<a href="category.php?id=5" class="a">Ужаси</a> ');};
if(strpos($c6, "1") !== false){print('<a href="category.php?id=6" class="a">Психо</a> ');};
if(strpos($c7, "1") !== false){print('<a href="category.php?id=7" class="a">Мистерия</a> ');};
if(strpos($c8, "1") !== false){print('<a href="category.php?id=8" class="a">Исторически</a> ');};
if(strpos($c9, "1") !== false){print('<a href="category.php?id=9" class="a">Документален</a> ');};
if(strpos($c10, "1") !== false){print('<a href="category.php?id=10" class="a">Семеен</a> ');};
if(strpos($c11, "1") !== false){print('<a href="category.php?id=11" class="a">Приключенски</a> ');};
if(strpos($c12, "1") !== false){print('<a href="category.php?id=12" class="a">Еротичeн</a> ');};
if(strpos($c13, "1") !== false){print('<a href="category.php?id=13" class="a">Драма</a> ');};
if(strpos($c14, "1") !== false){print('<a href="category.php?id=14" class="a">Уестърн</a> ');};
if(strpos($c15, "1") !== false){print('<a href="category.php?id=15" class="a">Екшън</a> ');};
if(strpos($c16, "1") !== false){print('<a href="category.php?id=16" class="a">Музикален</a> ');};
if(strpos($c17, "1") !== false){print('<a href="category.php?id=17" class="a">Криминален</a> ');};
if(strpos($c18, "1") !== false){print('<a href="category.php?id=18" class="a">Анимация</a> ');};
if(strpos($c19, "1") !== false){print('<a href="category.php?id=19" class="a">Фантастика</a> ');};
if(strpos($c20, "1") !== false){print('<a href="category.php?id=20" class="a">Детски</a> ');};
if(strpos($c21, "1") !== false){print('<a href="category.php?id=21" class="a">Сериал</a> ');};
if(strpos($c22, "1") !== false){print('<a href="category.php?id=22" class="a">Военен</a> ');};
if(strpos($c23, "1") !== false){print('<a href="category.php?id=23" class="a">Пародия</a> ');};
if(strpos($c24, "1") !== false){print('<a href="category.php?id=24" class="a">Друг</a> ');};
?><br />
ето и кода чрез който се записва
<td>Категория</td>
<td>
<?php
echo "
<table width=\"302\" border=\"0\" >
<tr>";
$i = "0";
$nared = "3";
$query = "SELECT * FROM janr";
$result = @mysql_query($query);
while ( $red = @mysql_fetch_array( $result )){
$ime = $red[name];
$id = $red[id];
$imeto1 = $red[imeto];
$i++;
$width = ceil(100/$nared);
echo "
<td width=\"1\"><input style=\"border: 0px;\" type=\"checkbox\" name=\"$id\" value=\"1\" />$ime
</td>";
if ($i == $nared){
echo "
</tr>
<tr>";
$i = 0;}}
echo "
<td colspan=\"3\">
</td>
</tr>
</table>";
?>
</td>
</tr>
<tr>