Question: prepare ( ' INSERT INTO orders ( product _ name, price ) VALUES ( :product _ name, :price ) ' ) ; $stmt - >

prepare('INSERT INTO orders (product_name, price) VALUES (:product_name, :price)');
$stmt->bindParam('':product_name', $_POST['product_name' ]);
$stmt->bindParam(' :price', $_POST['price']);
$stmt->execute();
?>
prepare('SELECT customer_id FROM orders WHERE product_id = :product_id');
$stmt->bindParam(' :product_id', $_GET['product_id']);
$stmt->execute();
$result = $stmt fetch PDO: :FETCH_ASSOC
what is the output for this code
 prepare('INSERT INTO orders (product_name, price) VALUES (:product_name, :price)'); $stmt->bindParam('':product_name', $_POST['product_name' ]);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!