Re: New user asks for help with connect func tion.

Daniel da Veiga <[email protected]>
Newsgroups gmane.comp.db.mysql.windows
Message-ID <[email protected]>
On 2/14/06, [email protected] <[email protected]> wrote:
> I would appreciate any assistance.
>
> I have MySQL 4.0.21 and Apache 2.0.52 and PHP 5.0.2 newly installed on mmy
> laptop.
>
> I am able to use PHP and Apache in my browser and see results.
>
> However, I am not successful when I attempt to connect to MySQL with PHP.
>
> The simple connection script I am using is as follows:
> ==============================================================
> <?php
> $conn = mysql_connect("LocalHost", "wesmith", "my password");
> echo $conn;
> ?>
> =============================================================
>
> I saved this script as mysqlconnect.php.
> When I access the script with my web browser I expect to see..
> Resource id #1
>

You're getting the same result as any of us would get with your
script, conn is an internal object, it shouldn't answer your echo
request. If you got no errors, congratulations, you've connected, now
what?! MySQL must know what to do...

> Instead I see nothing at all.  No error message.  Simply a blank screen.
>
> Note: I have been able to view other output from PHP with my browser that
> does not involve MySQL.  I don't know what I am doing wrong.
>

Take a look at the manual and try some scripts that do more than
connect, and ask back in case you get any error. Good luck.

> Any help would be appreciated.
>
> Wes smith
>
>
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe:    http://lists.mysql.com/[email protected]
>
>


--
Daniel da Veiga
Computer Operator - RS - Brazil
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
------END GEEK CODE BLOCK------

-- 
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.