I have records which column name is counter. And the value is like 000003, 000012, and so on. But my problem is, when I try to post it the value that receive in the form action url change, I receive only 3 which is the real value is 000003. Why is that? I echo POST value in my second page.
<?php
$mysqli = new mysqli("localhost", "root", "", "app");
$result1 = $mysqli->query("
SELECT *
FROM app
");
echo'<table border=1>
<thead>
<tr>
<th>cc</th>
</tr>
</thead>';
echo'<tbody>';
while($row = $result1->fetch_assoc()){
echo' <tr>';
echo "<td><a href='#' onclick='javascript:postIt(".$row['counter'].");'>".$row['counter']."</a></td> ";
echo'</tr>';
}
echo "</tbody></table>";
?>
<script>
function postIt(value){
document.forms[0].id.value = value;
document.forms[0].submit();
}
</script>
<form name="blah" action="check.php" method="post">
<input type="hidden" name="id">
</form>
Why 000003 become only 3, or 000172 become 172. Help?