Xnuiem wrote:
The problem here actually isnt MySQL, yet. PHP cant find the file it needs, the test.php.
Why dont you post what you have in firsttest.php and test.php and then where they are in the directories. That may give us the chance to really see what is going on.
Thank you very much xnuiem for ur response.
yes it can't find the file test.php , the problem is that there is no test.php in the first place.
Here is what i did
i created a new page called firsttest.php then in dreamweaver i pressed "+" ==> Mysql connection . then i wrote in connection name :"test" and filled in the rest and in databases i chose my database which is located on the remote server (i don't know where is it stored exactly that's the problem , i can't see any stored files , i created it with phpmyadmin) in dreamweaver i can see the database and the tables , so i chose it(2 files where uploaded to my remote server in /public_html/_mmServerScripts called mysql.php and MMHTTPDB.php
and then created a recordset from the tables inside it , so this code was generated in firsttest.php
Code:
<?php require_once('../Connections/test.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_test, $test);
$query_Recordset1 = "SELECT * FROM login";
$Recordset1 = mysql_query($query_Recordset1, $test) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/URL]">
<html xmlns="[url=http://www.w3.org/1999/xhtml]XHTML namespace[/URL]">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
i think the problem is here
Code:
<?php require_once('../Connections/test.php'); ?>
this folder is emtpy and i don't know where is test.php , i don't even know if there is a file which is called test.php , test is just the name of the connection.
Hope you can help me
Thank you very much m8