Просмотр поста

.
blackvj
# Str@nnik (05.02.2015 / 23:35)
Есть форма.
[php] echo '<div class="gmenu"><form action="?act=questions&amp;do=add&amp;id=' . $id . '" method="post">
<p>Введите вопрос (max 150):</p>
<input type="text" name="quesion" /
if($_POST['variant'] == 1)
$text = $_POST['variant1'];
elseif($_POST['variant'] == 2)
$text = $_POST['variant2'];

и надо так

<br /><p>Вариант 1 (max 50):</p>
<input type="radio" name="variant" value="1">
<input type="text" name="variant1" value="" />

<br /><p>Вариант 2 (max 50):</p>
<input type="radio" name="variant" value="2">
<input type="text" name="variant2" value="" />