<form class="form-inline" action="form.php">
            <div class="form-group">
            <label for="exampleInputName2">Name</label>
            <input type="text" name="username" class="form-control" id="exampleInputName2" placeholder="Jane Doe">
            </div><br/><br/>
            <div class="form-group">
            <label for="exampleInputEmail2">Email</label>
            <input type="email" name="email" class="form-control" id="exampleInputEmail2" placeholder="jane.doe@example.com">
            </div><br/><br/>
            <button type="submit" class="btn btn-default">Subscribe</button>
            </form>
<?php echo $_GET["username"]; ?><br/><br/>  : This is working.
<?php echo $_POST["username"]; ?><br/><br/> : this is not working.
shows error :Undefined index: username in C:\xampp\htdocs\project1\form.php on line 9
 
     
    