Page 2 of 2

Posted: Sat Aug 12, 2006 2:10 pm
by TJH
Hi,

You can declare this only once in each file.


include "IncludeFiles/db_config.php";
$myConn=mysql_connect($host,$uname,$pword);
$mydb=mysql_select_db($dbname,$myConn);



And you can use any name for variable. just make sure to use the variable you declared.

$sql2="select * from categories";
$rs=mysql_query($sql2,$myConn);


Cheers....