kuseni
Новичок
Undefined variable
Текст скрипта:
<html><body>
<?if($doGo) {?>
<form action="<?=$SCRIPT_NAME?>" method=post>
Введите имя: <input type=text name="name"><br>
Введите возраст: <input type=text name="age"><br>
<input type=submit name="doGo" value="Нажмите кнопку!">
</form>
<?} else {?>
Привет, <?=$name?>!<br>
Я знаю, Вам <?=$age?> лет!"
<?}?>
</body></html>
Ошибка:
Notice: Undefined variable: doGo in T:\home\localhost\ex2.php on line 2
Привет,
Notice: Undefined variable: name in T:\home\localhost\ex2.php on line 9
!
Я знаю, Вам
Notice: Undefined variable: age in T:\home\localhost\ex2.php on line 10
лет!"
Текст скрипта:
<html><body>
<?if($doGo) {?>
<form action="<?=$SCRIPT_NAME?>" method=post>
Введите имя: <input type=text name="name"><br>
Введите возраст: <input type=text name="age"><br>
<input type=submit name="doGo" value="Нажмите кнопку!">
</form>
<?} else {?>
Привет, <?=$name?>!<br>
Я знаю, Вам <?=$age?> лет!"
<?}?>
</body></html>
Ошибка:
Notice: Undefined variable: doGo in T:\home\localhost\ex2.php on line 2
Привет,
Notice: Undefined variable: name in T:\home\localhost\ex2.php on line 9
!
Я знаю, Вам
Notice: Undefined variable: age in T:\home\localhost\ex2.php on line 10
лет!"