I was making a simple form for getting data stored into variable.
My HTML Code:
<form class="form-horizontal" role="form" method="post" action="result.php">
    <div class="form-group">
      <label for="eat" class ="control-label col-md-3">Eating:</label>
        <div class="col-md-6">
            <input type="number" class="form-control" id="eating" placeholder="Hours Spent Eating Everyday">
        </div>
    </div> 
</form>
<div class="col-md-12">
<center><button type="submit" class="btn btn-default">Let's Know What You DID!</button></center>
</div>MY PHP Code:
<?php 
$eat = $_POST["eating"];
?>
Error I'm Getting:
Notice: Undefined index: eating Notice: Undefined variable: eating Please help me out, I am using WAMP with Version 7 of PHP.
 
    