Date: 08/31/01
- Next message: Andrius Jakutis: "[PHP-DB] resizing image with php - what is the quality?"
- Previous message: Dave Watkinson: "RE: [PHP-DB] Weird Problem In mysql_connect();"
- In reply to: Dave Watkinson: "RE: [PHP-DB] Weird Problem In mysql_connect();"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
JH has it right - your function has no idea what $host, $user, and $pass
are, because they're out of scope. Add the global statements that
Jonathan suggested inside your dbConnect function, and all will be well.
Dave Watkinson wrote:
> function dbConnect (){
> $link = mysql_connect($host,$user,$pass);
> }
And Jonathan Hilgeman correctly recommended:
> function dbConnect ()
> {
> global $host;
> global $user;
> global $pass;
> $link = mysql_connect($host,$user,$pass);
> }
--
_______ ___ _ ____ _____
Chris Hobbs / ____\ \ / / | | |/ ___\| __ \
Head Geek | (___ \ \ / /| | | | (___ | | | |
WebMaster \___ \ \ \/ / | | | |\___ \| | | |
PostMaster ____) | \ / | |__| |____) | |__| |
\____/ \/ \____/ \____/|_____/
http://www.silvervalley.k12.ca.us
chobbs <email protected>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Andrius Jakutis: "[PHP-DB] resizing image with php - what is the quality?"
- Previous message: Dave Watkinson: "RE: [PHP-DB] Weird Problem In mysql_connect();"
- In reply to: Dave Watkinson: "RE: [PHP-DB] Weird Problem In mysql_connect();"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

