Database Transactions being ignored

Hi,
I’m trying to output users details in a form for a movie screening system, using php and mysql, basically user enters details, selects a movie and then selects a screening time, their selection is removed from a screenings table to control availability and their details inserted into a booking table. I’m having a lot of trouble with the output of my code, at present the mysql statements are being ignored and no data is output.
I recently edited my code in order to fetch data from the database in order to populate the drop down menus before that the system worked fine with hard coded options in the drop down menu, but now nothing And im unable to understand where I have gone wrong!

troubleshooting can be frustrating but if you stick with a fundamental process in mind, then you should be able to pinpoint the problem. Since you are unable to see output from a database query: try running the query directly into a console to see that you are getting output from the sql and the database. If not, then you have a problem with sql or the database. Be sure to use PDO when interacting with a database.

if you see output in the console, then something is wrong with your sql in the script or something is wrong with php code. You should be able to see a problem if you step through the code like a debugger. Or try using a debugger.

It might be more beneficial to post the code being used, rather than us speculating (guessing) what the cause actually is.

It could be as simple as a syntax error, but there is no way to tell at this point.

Sponsor our Newsletter | Privacy Policy | Terms of Service