Instead of suppressing the error message using the @ sign, why not
remove it and your die() statement and see what error is produced on
your live server?

HTH

--Sam


-----Original Message-----
From: Ciprian Trofin [mailto:[EMAIL PROTECTED]] 
Sent: Friday, April 19, 2002 6:29 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Connection error

> Bisexuality doubles the chance of getting a date.


        Hi All!
        In order to make my job easy, a choose the following approach:

settings.php
<?
$dbserver = 'server';
$dbname = 'name';
$dbpass = 'password';
?>

main_file.php
<?
include "settings.php";
@mysql_connect($dbserver,$dbname,$dbpass) or die ("Error");
?>

        On the test machine (Windows 98, PHP Triad 221 - PHP 4.1.0) it
works;
when I put the project online, it doesn't (the "Error" message shows
up). If I
don't use this approach and, in main_file.php, I use the line:
          @mysql_connect('server','name','pass') or die ("Error")
        the sistem works.

        What's the problem ?

-- 
 Ciprian


> Confucius Says: Man who fight with wife all day, get no piece at
night!


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to