Also, you should include escaping, to prevent sql injection:
$query = sprintf("INSERT INTO orders (username, txn_id) VALUES('%s',%s')"
, mysql_real_escape_string($
, mysql_real_escape_string($
);
mysql_query($query) or die(mysql_error());
-r-
Main Topics
Browse All Topics





by: Raynard7Posted on 2007-06-27 at 23:14:17ID: 19378473
Hi,
e]}','$txn _id') ") or die(mysql_error());
this is because you are using php and to reference an array within "" then you need curly braces
ie
mysql_query("INSERT INTO orders (username, txn_id) VALUES('{$_SESSION[usernam
should work