Re: Can't get a MySQL connection either

Michael Louie Loria <[email protected]> Wed, 14 Feb 2007 21:11:01 -0800
Newsgroups gmane.comp.db.mysql.windows
Message-ID <[email protected]>
> 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, 479 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)

iQEVAwUBRdPrZbXBHi2y3jwfAQppNQf/YuPJB1k7TziPzU0ktvwqKD8xb3d55sMY
+AN6GisjV6QulqR9x3jEyLEbZ2yopIdWYgeOB15SBKXTwr9j/EdISrsX8f8CRQW4
cGRyjn30VPdEAYyk8HzGiG0hj/cmses1405fqAsz6JC7CGURI0vvICNPQbjxyyjY
cQ0/f5IlpvKYEzBCuR1kIyq2xaumFn5U0iMvHgZzQy9QG1Dvtv9In99R0ZNl0FxD
RYfuTnnsOX1CgLRH1lsQzsYuEk6wZdSErLdV353qBb1xl1rya4o614hELyb4fjXT
bEJoHsmIq+9bwNxSseBQ9n2rj05P7r2d2cLFIia17jE0/VGFd/Ud/g==
=T/Qa
-----END PGP SIGNATURE-----