Easily understand Get And Post Methods in PhP
Above Scripts
- <?php
- $x = 'Hello';
- echo $x;
- ?>
- <a href= "index.php?id">get</a>
- <?php
- if(isset($_GET['id']))
- {
- echo '<br>hello i got it';
- }
- ?>
- <form action="index.php" method="post">
- <input type="submit" value='post' name="submit">
- </form>
- <?php
- if(isset($_POST['submit']))
- {
- echo '<br>hello i got it';
- }
- ?>
No comments:
Post a Comment