We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,692 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Parse error

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">
2
Contributors
1
Reply
9 Minutes
Discussion Span
3 Months Ago
Last Updated
2
Views
Question
Answered
davy_yg
Master Poster
730 posts since May 2011
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 2

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.

veedeoo
Master Poster
735 posts since Oct 2011
Reputation Points: 298
Solved Threads: 129
Skill Endorsements: 13
Question Answered as of 3 Months Ago by veedeoo

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0661 seconds using 2.72MB