1,105,310 Community Members

Parse error

Member Avatar
davy_yg
Veteran Poster
1,115 posts since May 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 1 [?]
 
0
 
mysql_select_db('snack', $con);

<form action="action.php" method="post">

mysql_query("INSERT INTO Produk VALUES ('Produk')");
mysql_query("INSERT INTO Jumlah VALUES ('Jumlah')");
mysql_query("INSERT INTO Tanggal_Masuk VALUES ('Tanggal_Masuk')");

<input type="submit">
</form>



Parse error: syntax error, unexpected '<' in C:\xampp\htdocs\Innovation\script_shop\stock.php on line 56
line 56:     <form action="action.php" method="post">
Member Avatar
veedeoo
Veteran Poster
1,010 posts since Oct 2011
Reputation Points: 314 [?]
Q&As Helped to Solve: 164 [?]
Skill Endorsements: 17 [?]
 
1
 

you cannot embed html tags like that. You will have to close the PHP first and then add your html tags.

mysql_select_db('snack', $con);
?>
<form action="action.php" method="post">
<?php
mysql_query("INSERT INTO Produk VALUES ('Produk')");
mysql_query("INSERT INTO Jumlah VALUES ('Jumlah')");
mysql_query("INSERT INTO Tanggal_Masuk VALUES ('Tanggal_Masuk')");
?>
<input type="submit">
</form>

But then again, I have doubts if those codes will ever work though, because we don't have any clues about the rest of the codes.

Question Answered as of 1 Year Ago by veedeoo
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article