I'm getting this error while testing the script below just for connectivity.
Mysql is running on XP and apache and php are on openbsd. It seems like I
don't have something configured right in php I guess but I'm not sure. Here
is the script:

<?php
    $link = mysql_connect("192.168.2.4", "root", "")
        or die ("Could not connect");
    print ("Connected successfully");
    mysql_select_db ("mort")
        or die ("Could not select database");

    $query = "SELECT * FROM leads";

          //make sure you've got this area correct
          // and if you're not sure check the snazzy phpmyadmin cheat sheat
           // on creating queries!

    $result = mysql_query ($query)
        or die ("Query failed");

        // printing HTML result

        print "<table>\n";
        while ($line = mysql_fetch_array($result)) {
            print "\t<tr>\n";
            while(list($col_name, $col_value) = each($line)) {
                print "\t\t<td>$col_value</td>\n";
            }
            print "\t</tr>\n";
        }
        print "</table>\n";

    mysql_close($link);
?>


Thanks in advance for any help.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to