In php I know only the basics. Now it took to work with requests. Just want to see examples of processing these requests and how it works. Thought up to this:
<?php echo "Привет, $_GET['name'] !"; ?>
In the browser I enter http://localhost/script.php?name=Vasiliy
. It seems to be "Hi Vasiliy", but the error is:
Parse error: syntax error, T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in Z: \ home \ localhost \ www \ get.php on line 2
Where is the mistake? Please provide examples of simple Get and Post requests. I do not plan to use forms yet, I want from the address bar of the browser. And please do not forget the comments. ))