0

cannot update the db with below query. little help will be much aprreicated. Thanks in advacne

 $order_number=$_GET['order_number'];
 $invoice_id=$_GET['invoice_id'];
 $credit_card_processed=$_GET['credit_card_processed'];
 $total=$_GET['total'];
 $key=$_GET['key'];
 $email=$_GET['email'];
 $query = "UPDATE register_users SET order_number=$order_number, invoice_id=$invoice_id, 
 credit_card_processed=$credit_card_processed, total=$total, key=$key WHERE email=$email";

Edited by pritaeas: Added markdown.

4
Contributors
6
Replies
23
Views
3 Years
Discussion Span
Last Post by Riteman
0

You are missing single quotes around the varchar columns. It would be best to add some error checking, so these kinds of mistakes are easily spotted.

0

sorry using below syntax for query
$query = "UPDATE register_users SET order_number='$order_number', invoice_id='$invoice_id',
credit_card_processed='$credit_card_processed', total='$total', key='$key' WHERE email='$email'";

0

i had used single quotes still only. was trying other iterations so copy pasted wrong syntax

pls guide.

0

Reasons may be..

incorrect table name or column names or you would have misspelled them. Missing quotes also creates error. as janissantony said, post your error so we can figure it out...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.