I've just switched web hosts, and I have this script that ultimately connects to a database and displays it on a webpage.
It used to work fine, however now I can get it to display the database info in the webpage, however I can't update the fields. I can create new fields within some tables of the database, yet doing anything more than that, and it's not working - no error message, the page just seems to refresh and that's that.
I was wondering if an expert could have any suggestions of things to check, as I can't figure this one out - I've changed the config files to match the new DB, which is what I just can't understand.
Any help would be appreciated, and if needed I can post the code and stuff.
I'm assuming you just have the one location for setting connection details. If you have them all over the place, ensure that you've changed them all. However, you'd probably get an error if you've used the 'or die(...)' structure.
Do you have the right priviledges (for the user mentioned in the connection details) to do what you need?
It may be useful to give an example of any code that fails to work. Scramble your connection details (user/pw) before posting though.
I've copied/pasted the page to where you make the majority of the changes. Apologies if it's a little messy!
Also, I don't know why or even how, but on PHPMyAdmin, I'm looking at the database, and when I click on the 'schedule' table, it just logs me out. Every time. I've tried deleting the database and restoring it, but it used to work. I really don't understand...
I just find it a little strange because it worked on the old host, but not now. I'm wondering if the DB has a setting where it allows changes without having it actually open, or something like that? The user for the DB has full privelledges, so I doubt that's the problem.
I copied the text you gave into the sql pane, and it came up with an error message:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '$query = "SELECT * FROM " . $dbtable . " WHERE day = '" . $day . "' ORDER BY `' at line 1
I'm assuming that's what you told me to do? (I have a basic, self taught knowledge, the person that created this script for me isn't able to help me diagnose the problem)