mysql_connect('localhost', 'my_user', 'my_pass') or die(mysql_error()):
On Tue, 8 Mar 2005 11:28:47 -0600, Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > I am a new mysql user. I installed a MySQL, PHP and Apache on my > computer with Windows XP. > All my php scripts run fine unless I try to connect to mysql > > <?php > echo "start here"; > $a = mysql_connect("localhost", "test", "test"); > echo $a; > echo "stop here"; > ?> > > I don't get any response even error message and page source looks like > > <html> > <head> > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> > <title>Untitled Document</title> > </head> > <body> > start here > > I guess that I am doing something very stupid - still could anybody help > me? > [/snip] > > Try this... > > if(!($dbconnect = mysql_connect("localhost", "test", "test"))){ > echo mysql_error() . "\n"; > exit(); > } > > It will give you a more descriptive error if there is one > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > -- Eric Bergen [EMAIL PROTECTED] http://www.ebergen.net -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]