我已经搜索过了,但我不明白为什么这不起作用。
<input type="radio" name="soort" value="in" echo ('.$_GET['soort'].'=="in")?"checked":"">In-Company<br />
<input type="radio" name="soort" value="open" echo ('.$_GET['soort'] . '"=="open")?"checked":">Open inschrijving<br />
这也不起作用:
<input type="radio" name="soort" value="in" echo ($soort=="in")?"checked":"">In-Company<br />
<input type="radio" name="soort" value="open" echo ($soort=="open")?"checked":">Open inschrijving<br />
显然我做错了什么或者我错过了一些东西。
如果有人可以在这里帮助我或将我引向正确的方向。谢谢!!!!
这是整个表格。
print '<form action="edit_dienst.php" method="post">
<p><strong>Titel</strong> <textarea name="navigatie" columns="20" rows="5">' . $row['navigatie'] . '</textarea></p>
<p><strong>Tekst</strong> <textarea name="tekst" columns="20" rows="5">' . $row['tekst'] . '</textarea></p>
<input type="radio" name="soort" value="in" echo ($soort=="in")?"checked":"">In-Company<br />
<input type="radio" name="soort" value="open" echo ($soort=="open")?"checked":">Open inschrijving<br />
<input type="hidden" name="id" value="' . $_GET['id'] . '" />
<input type="submit" name="submit" value="Pas aan!" />
</form><p></p>';