I am trying to insert price value into a database table, but it doesnt seem to capture and send, could someone point me to the right direction?
here is my code:
Code: Select all
$query = "INSERT INTO orders (date_order, price)
values (NOW(), '$price')";
if (!mysql_query ($query, $link) )
{
die (mysql_error());
}
print "Thank you! Your order has been completed.";
if ($action == "order")
print "<form name="order" action="./order.php? action=order" method=post>";
print "Price:";
print "<SELECT NAME="price" > ";
print "<option value="9.99">9.99";
print "<option value="19.99">19.99";
print "<option value="29.99">29.99";
print "</select>";
print "<input type=submit value=Order></form>";Code: Select all
create table orders (
id int(11) AUTO_INCREMENT PRIMARY KEY,
clientid int(11),
order_date DATETIME,
price DOUBLE NOT NULL,
feature_price DOUBLE NOT NULL,
total DOUBLE NOT NULL
);thank you