jpharper
2-21-04, 10:05 PM
Just beginning to write code in PHP and cannot seem to connect to my DB via a PHP program.
The code is
mysql_connect("mysql05.powweb.com", "mysqlID", "mysqlpassword");
$Result = mysql_query("select * from dgfly.TruckInv where UserID = '$UserID'");
print "Result $Result<br>";
if ($Result) {
if (mysql_num_rows($Result) > 0) {
print "Access Granted";
$Found = true;
}
}
The "mysqlID" is the ID which works just fine with the phpmyadmin server interface and the "mysqlpassword" which I use there.
Thanks for any pointers
The code is
mysql_connect("mysql05.powweb.com", "mysqlID", "mysqlpassword");
$Result = mysql_query("select * from dgfly.TruckInv where UserID = '$UserID'");
print "Result $Result<br>";
if ($Result) {
if (mysql_num_rows($Result) > 0) {
print "Access Granted";
$Found = true;
}
}
The "mysqlID" is the ID which works just fine with the phpmyadmin server interface and the "mysqlpassword" which I use there.
Thanks for any pointers