Database Admin Tool
Posted: Tue Oct 14, 2003 9:10 am
All I am trying to develop a script whereby via a web interface users can add/update/edit details on a MySQL database. I do not want it to be something like phpMyadmin at all, as this does not give me the ability to monitor what they are doing. As I am new to PhP I have been doing some research from http://www.php.net and just wanted to make sure that the below code is correct in that it will make a server connection select the database and then close the connection, Pleae can you advise if this is correct.
Thanks
CK
http://www.networkingbasics.co.uk
Code is as follows
<?
/* Connect to the MySQL Database
$link=mysql_connect("localhost","user",("password")
or die("Sorry could not connect to database. Please contact support")
/* Select Database to run script on
mysql_select_db("db_name") or die ("Could not select required Database")
/* Closing connection to Database
mysql_close($link);
Thanks in advance
Thanks
CK
http://www.networkingbasics.co.uk
Code is as follows
<?
/* Connect to the MySQL Database
$link=mysql_connect("localhost","user",("password")
or die("Sorry could not connect to database. Please contact support")
/* Select Database to run script on
mysql_select_db("db_name") or die ("Could not select required Database")
/* Closing connection to Database
mysql_close($link);
Thanks in advance