Re: Newbie to My Sql.... need some assistance
I wanted to post what I have for my connection code. On my index.php page, I have a header.inc and a connect.php which is the info below. I did many variations but am unsure if there needs to be anything special for just a local server setup. Thanks guys and gals.
- Brenden
<?
$cn = mysql_connect ("localhost", "root","mypassword") or die("Could not connect to server");
if(mysql_select_db ("my_database",$cn)==false) {die ("Could not connect to database");}
function SQLParse($str)
{
return stripslashes(str_replace("'","''",$str));
}
?>
Subject
Written By
Posted
November 18, 2004 02:37PM
Re: Newbie to My Sql.... need some assistance
November 18, 2004 02:46PM
November 18, 2004 04:03PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.