var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Why can't I connect to my database? Noob alert!
Hello, I'm quite new to databases and have no idea where I have gone wrong. Please help me find out why I can't connect to my database.
I'm getting an error with Dreamweaver - Dynamicaly-related files cannot be discovered because there is no site definition for this document
My Site root is located in htdocs.
the main file I'm trying to run is "dataquery.php" - htdocs/LetsPlays/dataquery.php
$query = "SELECT * FROM userchanel";
$result = mysql_query($query);
while($person = mysql_fetch_array($result));
Dataquery is connected to "databaseform.php" - htdocs/LetsPLays/includes/databaseform.php
$dbhost = 'localhost';
$dbuser = 'root';
$db = 'mysql_tut';
$conn = mysql_connect($dbhost,$dbuser,$dbpas);
So I'm trying to connect to userchanel table through user tbl
screenshot: Imageshack - usertbl.png
Files run through wordpress are set up to run on 127.0.0.1
Please help me.
Sorry for the noobishness! I have no idea what I'm missing!
When I run the html file all I get is a blank page!
You should look more closely at the code being used to open a connection with the database and display any error messages should the function fail in error.
$conn = mysql_connect($dbhost, $dbuser, $dbpas) or die("ERROR:" . mysql_error());
mysql_select_db($userchanel) or die("ERROR: " . mysql_error());