plusnplus Posted January 21, 2010 Share Posted January 21, 2010 Hi, I have sample code like: $query = "INSERT INTO tbl_a1 VALUES ('','$item_id','$item_qty')"; print "$query"; mysql_query($query); header("location: item-list.php"); the query is execute, comeback to item-list.php without interruption of print the query statement. Anyone know what is wrong with that situation/ code ? Thanks for any help Link to comment https://forums.phpfreaks.com/topic/189261-php-code-can-not-print-to-screen/ Share on other sites More sharing options...
teamatomic Posted January 21, 2010 Share Posted January 21, 2010 How can you print an insert? it has no output. HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/189261-php-code-can-not-print-to-screen/#findComment-999139 Share on other sites More sharing options...
plusnplus Posted January 21, 2010 Author Share Posted January 21, 2010 Hi teamatomic , I just want see the query statement for debug purpose. Link to comment https://forums.phpfreaks.com/topic/189261-php-code-can-not-print-to-screen/#findComment-999141 Share on other sites More sharing options...
teamatomic Posted January 21, 2010 Share Posted January 21, 2010 You could try reversing the quotes $query = 'INSERT INTO tbl_a1 VALUES ("","$item_id","$item_qty")'; and see what happens. I've never tried to echo out a query so I dont know if it will work. HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/189261-php-code-can-not-print-to-screen/#findComment-999169 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.