|
Posted by Juegen Koenig on 02/03/07 18:17
Sorry, I am completely new to the subject and it begins very frustrating.
I took an example almost word for word from a book and it doesn't work. I
have no idea where to look next.
What ist wrong with the following file:
<?
$host="192.168.0.11";
$user="root";
$pass="passwort";
$database="Lehrerverzeichnis";
$dz=mysql_connect($host,$user,$pass);
mysql_select_db($database,$dz);
?>
<html>
<head></head>
<body>
<?
$sql=mysql_query("SELECT * from TelefonEmail");
while ($ds=mysql_fetch_object($sql)){
$name=$ds -> name;
$vorname=$ds -> vorname;
echo "$name $vorname<br>";
}
mysql_close($dz)
?>
</body>
I myself am sitting at machine 192.168.0.200. I can open the database and
the table using phpmyadmin with those parameters without any problem. I get
a lost connection. at line 6.
I have for some reason set $host to "localhost" and it works to my surprise
to line 14, where it says "supplied argument is not valid"
So what is correct, when I am working at 192.168.0.200 and the server ist
192.168.0.11. What should hosts be? And if it is really 'localhost', what I
do not believe, what does the error mean?
Thanks
Jürgen
Navigation:
[Reply to this message]
|