Hello,
I am trying to create a stock recording system:
<h4>STOCK RECORDING SYSTEM</h4>
<form action="action.php" method="post">
<table border="0" width="200">
<tr>
<tr>
<td>Produk :</td><br>
<td><input type="text" size="12" maxlength="22" name="Produk"></td>
</tr>
<tr>
<td>Jumlah :</td>
<td><input type="text" size="12" maxlength="22" name="Jumlah"></td><br>
<tr>
<td>Tanggal :</td>
<td><input type="text" size="12" maxlength="22" name="Tanggal"></td><br>
</tr>
</table>
</form>
<?php
username='root';
password='';
$con = mysql_connect(localhost, username, password);
mysql_select_db("snack", $con);
mysql_query("INSERT INTO Produk VALUES ('Produk')");
mysql_query("INSERT INTO Jumlah VALUES ('Jumlah')");
mysql_query("INSERT INTO Tanggal_Masuk VALUES ('Tanggal_Masuk')");
?>
Parse error: syntax error, unexpected '=' in C:\xampp\htdocs\Innovation\script_shop\stock.php on line 27
Line27: username='root';
the username is correct. Why the error still appears?