I am new to PHP. I am trying to develop a web site on a development
machine that needs to access data in a mysql database. I have mysql
running on my development machine with a copy of the database. While
developing the app. I can connect to the local version of the database
without problems. Once I upload the database to its host site I need
to change the php scripts that connect to the database to refelect the
appropriate connection associated with the hosting server. Does
anyone know of an efficient way to have my script test for which
location it is on and connect to the appropriate mysql database? Or,
does anyone know of a php script that can handle this
programmaticall y? Thanks for any time in advance.
A. Cate
machine that needs to access data in a mysql database. I have mysql
running on my development machine with a copy of the database. While
developing the app. I can connect to the local version of the database
without problems. Once I upload the database to its host site I need
to change the php scripts that connect to the database to refelect the
appropriate connection associated with the hosting server. Does
anyone know of an efficient way to have my script test for which
location it is on and connect to the appropriate mysql database? Or,
does anyone know of a php script that can handle this
programmaticall y? Thanks for any time in advance.
A. Cate
Comment