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
                       [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to