<td>Jumlah :</td>
<td><input type="text" size="12" maxlength="22" name="Jumlah" value="2 box 1 pack"></td><br>
<tr>
<?php // use date picker to automate date ?>
<td>Tanggal :</td>
<td><input type="date" id="datepicker" size="12" maxlength="22" name="Tanggal" value=""></td><br>
</tr>
<?php
if (isset($_POST['submit'])){
mysql_query("INSERT INTO Stock (Produk,Jumlah,Tanggal) VALUES ('$_POST[batch]','$_POST[Jumlah]','$_POST[Tanggal]')");
echo "<script type=\"text/javascript\">
window.location = \"print.php\";
</script>";
}
?>
</table>
<input name="submit" type="submit" value="Submit">
</form>
<?php
echo mysql_query("SELECT * FROM stock");
?>
This is a form with sql query to view what's stored in the table. I receive this message though:
Produk :
Jumlah :
Tanggal :
Resource id #5
(where the resource id #5 appeared from?)