Here is the code:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <? if ($_SERVER['REQUEST_METHOD'] == 'POST'), name="Vasya" { echo "<h1>Привет, хозяин!</h1>"; } if ($_SERVER['REQUEST_METHOD'] == 'POST') { echo "<h1>Привет, <b>" . $_POST['name'] . "</b>!</h1>"; } ?> <form method="POST"> Введите Ваше имя: <input type="text" name="name"> <br> <input type="submit" name="okbutton" value="OK"> </form> </body> </html>
As many have already understood, the task of the code is to display the message "Hello, master!", If a person entered Vaysa, if something else, then simply "Hello, the name of a person!". But a syntax error occurs:
Parse error: syntax error, unexpected ',' in /home/tester/public_html/test.ru/test.php on line 7
How to fix the error and what is it?