[UPHPU] Is php seeing mysql?

District Webmaster webmaster at alpine.k12.ut.us
Fri Feb 27 07:52:39 MST 2004


So now I find myself thinking, "Ashley . . . hmmmmm. . ."

I know that Ashley is on the long list of names (like Lindsey, Lesley,
etc.) that were originally male names. But Ashley is almost never used
for males anymore. . . could it be that we have a woman amongst us? On a
programmers mailing lists? Saints be praised, we're diverse!!!! :)

Dave

>>> David Smith <davidsmith at byu.net> 02/27/04 7:26 AM >>>
Ashley Oviatt wrote:

>How can you test to see if php is seeing the mysql databases? I have
>phpinfo.php working correctly, but phpMyAdmin isn't. It just gives a
blank
>  
>

I would make a quick test.php that contains this:

|<?php
    $db_host = "mysql.example.com";
    $db_user = "root";
    $db_password = "";
    $db_name = "test";
    $connection = mysql_connect( $db_host, $db_user, $db_password );
    $db = mysql_select_db( $db_name );
    if( mysql_ping( $connection ) )
        echo "your database is online",
    else
        echo "your database is offline", 
    mysql_close( $connection );
?>|

For more info: php.net/mysql_ping



---------------------------------------------------------------------
To unsubscribe, e-mail: list-unsubscribe at uphpu.org
For additional commands, e-mail: list-help at uphpu.org






More information about the UPHPU mailing list