rana28
asked on
PHP-My Sql connectivity
Dear Experts,
I am unable to connect my mysql database from php script, I am using Red Hat Linux 9.0 where the php and mysql are inbuild . I have write the following script for mysql connection, but when I run the scripit the error message is undefined function mysql_connect()
<HTML>
<BODY>
<?php
$db = mysql_connect("mysql0x.pow web.com"," xxxx","xxx xxxxxx","a ssets");
mysql_select_db("accounts" ,$db);
$hyper = mysql_query("SELECT * FROM accounts", $db);
while ($myrow = mysql_fetch_array($hyper))
{
echo $myrow["accid"];
echo "in the while loop";
echo $myrow["account"];
echo $myrow["phone"];
echo $myrow["contact"];
echo $myrow["cphone"];
}
?>
</BODY>
</HTML>
I am unable to connect my mysql database from php script, I am using Red Hat Linux 9.0 where the php and mysql are inbuild . I have write the following script for mysql connection, but when I run the scripit the error message is undefined function mysql_connect()
<HTML>
<BODY>
<?php
$db = mysql_connect("mysql0x.pow
mysql_select_db("accounts"
$hyper = mysql_query("SELECT * FROM accounts", $db);
while ($myrow = mysql_fetch_array($hyper))
{
echo $myrow["accid"];
echo "in the while loop";
echo $myrow["account"];
echo $myrow["phone"];
echo $myrow["contact"];
echo $myrow["cphone"];
}
?>
</BODY>
</HTML>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.