note 54975 added to function.mysql-connect
| From: | jmckean at rogers dot com | Date: | Thu, 21 Jul 2005 11:36:12 +0000 |
| Subject: | note 54975 added to function.mysql-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-92248@lists.php.net to get a copy of this message | ||
Simple Secure Database Access
In your /.htpasswds folder create this file named
db_connect.php
<?
mysql_connect("localhost",username, password);
?>
In your scripts, connect to MySQL with this line:
require ("/home/sitefolder/.htpasswds/db_connect.php");
----
Manual Page -- http://www.php.net/manual/en/function.mysql-connect.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54975
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54975&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54975&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54975&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54975&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54975&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54975&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54975&report=yes
Search -- http://master.php.net/manage/user-notes.php