Is there something wrong in this simple code? I'm trying to store input type weight into a php variable $w....tried echo $w to check if it has been stored but it doesn't display anything..:p
<html>
<head>
<title></title>
</head>
<body>
<form action='' method='POST'>
<label>Enter Weight: </label><input type='text' name="weight">
</form>
<?php
$w=$_POST["weight"];
echo $w;
?>