Forum Moderators: coopster
I've only just started with PHP and MySQL, and I have set up a localhost apache server.
I have a few questions about how best to go about bulding and testing a website that will interface with a database.
At present, I am using PHP scripting, to get(and put) data to a database that I have defined on localhost using phpmyadmin. What happens when I want to "upload" my website?
Do I need to change all the php code to now reference the host's server location?
How do I upload my table? (or must I dynamically create the table on the first load of the site?)
What is the 'best practise' method for building and testing php/mysql websites?
Thanks. :)
Do I need to change all the php code to now reference the host's server location?
It's definitely worth considering splitting your code down into include files if you haven't already. That way when you have to make a change to something you only have to do it once rather than multiple times. The connection to your database would normally be in an include file for example.