phpbar.de logo

Mailinglisten-Archive

[php] MySql - Connect mit PHP

[php] MySql - Connect mit PHP

Rene Paschold mailing_(at)_rpnetworks.de
Thu, 13 Jul 2000 16:06:45 +0200


Hallo Benjamin,

><?php $host = 'localhost'; $user = 'xxxxx'; $passwd = 'xxx'; $dbname = 
>'linkdb'; $query = 'select * from hockey'; echo "Hostname: $host
>"; echo "Username: $user
>"; echo "Passwd: $passwd
>"; echo "DBname: $dbname
>"; echo "Query: $query
>"; $ConHandle = mysql_connect($host,$user,$passwd); if ($ConHandle = -1) 
>{echo "hat nicht funzt
>";} $DBHandle = mysql_select_db($dbname, $ConHandle); $QryHandle = 
>mysql_query("select * from hockey", $DBHandle); $CloseHandle = 
>mysql_close(); ?>
>ende
>   ENDE------------------------

Versuche mal deine Variablen Deklaration in "" zu setzten, also $host = 
"localhost" usw.
Was steht den in Zeile 22 ??

>Mit freundlichen Grüßen,
>
>Benjamin Tolasch


Rene




--
Rene Paschold
Webmaster RPN (http://www.rpnetworks.de)
ICQ - 1398307

"Retain the luck of having friends and don't give it up for money or fame"
--



php::bar PHP Wiki   -   Listenarchive