My code for Buy.php.
For some reason whenever I fill out both fields of shares and symbol correctly I get the apologize error that the data wasn't inserted into the table correctly. (I don't think I made any significant changes to the code recently to cause this because it was working just fine moments ago). What could be wrong, I would think for the issue to be around the if statement that inserts the new shares bought.
For some reason
query() returns 2 (stored in
$buyCheck) for the long INSERT statement, why? I have no clue. I believe it should only be updating/inserting one row in that SQL statement.
Any help will be greatly appreciated.