Re: Connect to MySQL Database Using PHP

From: Date: Sat, 28 Feb 2004 21:19:01 +0000
Subject: Re: Connect to MySQL Database Using PHP
Groups: php.db 
Request: Send a blank email to php-db+get-33211@lists.php.net to get a copy of this message
Thanks, I will try both suggestions. Much appreciated! Paul
From: Mathias Hunskår Furevik <mf@root.no> To: Paul Higgins <developer_paul_php@hotmail.com> Subject: Re: [PHP-DB] Connect to MySQL Database Using PHP Date: Sat, 28 Feb 2004 21:51:30 +0100 You can include a file with: <?php $host = "host"; $Username = "username"; ... And then use: require("include.php"); in alle php documents, and then use $host etc in the Connect-function. - Mathias Furevik På Sat, 28 Feb 2004 14:43:23 -0500, skrev Paul Higgins <developer_paul_php@hotmail.com>:
I currently connect to my database (MySQL) through PHP with the following lines: $db = mysql_connect( 'host', 'userName', 'password'); mysql_select_db( "database_name", $db); The host, userName, and password are all hard coded into the PHP document. I would prefer not to do this. How can I connect to the database without having my sensitive information hard coded into the PHP? Thanks, Paul _________________________________________________________________ Find and compare great deals on Broadband access at the MSN High-Speed Marketplace. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/
-- Sender med M2, Operas revolusjonerende e-postprogram: http://www.opera.com/
_________________________________________________________________ Find and compare great deals on Broadband access at the MSN High-Speed Marketplace. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/

« previous php.db (#33211) next »