please help to me to solve this problem
I'm stuck, Thank you
- Create a new database called "project."
- Create a new table called "salesJournal."
- The "salesJournal" table has the following fields: salesID (PK, Autonumber), dateOfSale, customerID (FK), saleAmount
- Create a new table called "customer."
- The "customer" table has the following fields: customerID (PK, Autonumber), customerName
- The "salesJournal" and "customer" table must be linked so that referential integrity is maintained (for example, I should not be able to delete a customer that has data in the "salesJournal" table.
- Create PHP and HTML files to allow us to: Create new customers and sales to the customers. Delete existing customers and sales transactions of those customers. Update the customerName given customerID. View salesJournal data by customerID.
I have already done 1 through 6
Here are the php files and html files I have created
File name : getUserInfo.html
<html>
<head>
</head>
<body>
<form method="post" action="insertUserData.php">
customerName: <input name="fcustomerName" type="text" />
saleAmount: <input name="saleAmount" type="decimal(50,2)" /><input value="Submit" type="submit" /></form>
</body>
</html>
File name: insertUserData.php
<?php
include("connectionBegin.php");
mysql_query("INSERT INTO customer
(customerName) VALUES('$_POST[fcustomerName]')")
mysql_query("INSERT INTO salesJournal
(saleAmount) VALUES('$_POST[saleAmount]' )") ;
or die(mysql_error());
include("connectionClose.php");
echo "Data Inserted!<br />";
?>
http://pink0812.us/pr/sales/getUserInfo.html
That is the link I have to enter customers name and saleamount into two tables
Parse error: syntax error, unexpected T_STRING in /home/pink0812/public_html/pr/sales/insertUserData.php on line 8
that's the message poped out after I inserted data