[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-win32
Subject:    Re: Can't get a MySQL connection either
From:       Michael Louie Loria <mlloria () lorztech ! com>
Date:       2007-02-15 5:11:01
Message-ID: 45D3EB65.40306 () lorztech ! com
[Download RAW message or body]


> This is posted by another user and I am also trying for answers at the
> MySql-PHP list:
>
> When entering the following, I do not get a response in any fashion
> from the developmental server on my system, just a blank page. Any
> ideas how I can complete the connection?

> <!doctype html public "-//W3C//DTD HTML 4.0 //EN"> <html> <head>
> <title>MySql</title>
> </head>
> <body>
> <?php
> $dbServer='localhost';
> $dbUser='root';
> $dbPass='';
> $dbName='test';
> $link = mysql_connect("$dbServer", "$dbUser", "$dbPass") or die("Could
> not connect");
> print "Connected Successfully<br>";
> mysql_select_db("$dbName") or die("Could not select database");
> print "Database selected successfully<br>";
> mysql_close($link);
> ?>
> </body>
> </html>

1. $link = mysql_connect($dbServer, $dbUser, $dbPass) or die("Could not
connect");

2. mysql_select_db($dbName) or die("Could not select database");

I removed the characters " because those are variables.



["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic