+ 3
GET http://localhost/index.php?KEY=VALUE $_GET[KEY] // This return: VALUE Exemple 1 http://localhost/index.php?id=10 echo $_GET['id']; // return 10 Exemple 2 http://localhost/index.php?name=Gabriel&age=18&country=Brazil $_GET['name']; // return: Gabriel $_GET['age']; // return: 18 $_GET['country']; // return: Brazil POST file: index.php <form action="getPostData.php" method="post"> <input type="text" name="name" /> <input type="text" name="age" /> <input type="text" name="country" /> <input type="submit" value="send" /> </form> file: getPostData.php echo 'name: ' . $_POST['name']; echo 'age: ' . $_POST['age']; echo 'country: ' . $_POST['country'];
4th Aug 2016, 5:08 PM
Gabriel Almeida