Stock Recording System - I basically wants to see the data recorded in the table sql. yet this is not the case.
mysql_query("INSERT INTO Produk FROM stock VALUES ('Produk')");
mysql_query("INSERT INTO Jumlah FROM stock VALUES ('Jumlah')");
mysql_query("INSERT INTO Tanggal_Masuk FROM stock VALUES ('Tanggal_Masuk')");
Is that instruction not enough to record data? Thanks.
<h4>STOCK RECORDING SYSTEM</h4>
<form action="action.php" method="post">
<table border="0" width="300">
<tr>
<tr>
<td>Produk :</td><br>
<td>
<select name="batch" onchange="submit();">
<option value="-1" >-- Select Address --</option>
<?php
$username='root';
$password='';
$con = mysql_connect('localhost', $username, $password);
mysql_select_db('snack', $con);
$result = mysql_query("SELECT * FROM PO");
while($row = mysql_fetch_array($result))
{
?>
<option value="<?php echo $row['PO'];?>">
<?php echo $row['PO'];?></option>
<?php
}
?>
</select>
</td>
</tr>
<tr>
<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>
</table>
</form>
<?php
$username='root';
$password='';
$con = mysql_connect('localhost', $username, $password);
mysql_select_db('snack', $con);
?>
<form action="print.php" method="post">
<?php
mysql_query("INSERT INTO Produk FROM stock VALUES ('Produk')");
mysql_query("INSERT INTO Jumlah FROM stock VALUES ('Jumlah')");
mysql_query("INSERT INTO Tanggal_Masuk FROM stock VALUES ('Tanggal_Masuk')");
?>
<input type="submit" value="Submit">
</form>
</html>