подскажите, если я создал файл whatsName.html :
<html>
<head>
<title>What's your name?</title>
</head>
<body>
<h1>What's your name?</h1>
<h3>Writing a form for user input</h3>
<form method="post"
action="hiUser.php">
Please type your name:
<input type ="text"
name="userName"
value ="">
<br>
<input type="submit">
</form>
</body>
</html>
и файл hiUser.php :
<html>
<head>
<title>Hi User</title>
</head>
<body>
<h1>Hi User</h1>
<h3>PHP program that receives a value from "whatsName"</h3>
<?php
$userName=$_POST["userName"];
print "<h3>Hi there, $userName!</h3>";
?>
</body>
</html>
Я ОТКРЫВАЮ ПЕРВЫЙ ДОКУМЕНТ С ФОРМОЙ ВПИСЫВАЮ ТУДА СВОЁ ИМЯ - САША, НАЖИМАЮ "отправить запрос"
а у меня получается :
Hi User
PHP program that receives a value from "whatsName"
Hi there, $userName!"; ?>
почему не получается:
Hi User
PHP program that receives a value from "whatsName"
Hi there, СAША!
ПОДСКАЖИТЕ, ЧТО НЕ ТАК НАПИСАННО.
|