hi
im having probs connecting to my db using php running as localhost using dreamweaver, i think its something to do with the server path to mysql which is set up when defining your site, dreamweaver assumes its in the same folder as your site but it isnt and i dont know what path to put , i know its in /usr/local/mysql/bin but that path isnt accepted by dreamweaver and i dont think i have access to it as a user only as root, also the php code connect if i write it myself , i had it all running on my old win pc no prob i think coz apache php and mysql are all located in the same folder heres a snippet of code
<?php
$host="localhost";
$username="root";
$pass="jlkj99";
$database="hayesdec";
$tablename="login";
$connection=mysql_connect($host,$username,$pass);
if(!$connection){
echo"no con";
}
$result=mysql_select_db($database)
if($result){
echo"yippee";
}
$query="SELECT * from" .$tablename";
$result= mysql_query($query);
if(!$result){
echo"no result";
}
while ($row=mysql_fetch_array($result))
{
echo row["username"];
echo row["password"];
}
?>