anoniem Geplaatst: 30 december 2002 Delen Geplaatst: 30 december 2002 Weet iemand wat onderstaande foutmelding inhoud en wat ik moet doen om deze niet meer te krijgen zodat het goed werkt. Draai op localhost. [code:1:f90f575c2f]Warning: Unknown MySQL Server Host 'c' (2) in c:\program files\easyphp\www\php.php on line 16 Warning: MySQL Connection Failed: Unknown MySQL Server Host 'c' (2) in c:\program files\easyphp\www\php.php on line 16 kan SQL server niet selecteren[/code:1:f90f575c2f] Quote Link naar reactie
anoniem Geplaatst: 30 december 2002 Auteur Delen Geplaatst: 30 december 2002 nou... Vertel eens meer over je database? t. Quote Link naar reactie
anoniem Geplaatst: 31 december 2002 Auteur Delen Geplaatst: 31 december 2002 Ik weet al waar het probleem zit. Ik draai lokaal PHP en MySQL. Ik vul in als gebruikersnaam "localhost" en als username en password vul ik niks in. Zie hieronder mij script. [code:1:a5d83e865e] <html> <head> <title><PHP Pagina</title> </head> <body> <table width="420" border="1" algin="center"> <tr> <td width="20">ID</td> <td widht="160">Titel</td> <td width="240">Bericht</td> </tr> </table> <?php mysql_connect("localhost","","") or die("kan SQL server niet selecteren"); mysql_select_db("nieuws") or die("kan database niet selecteren"); $query = "SELECT Nieuws_ID, Nieuws_Titel, Nieuws_Bericht FROM nieuwsbericht"; $nieuw = mysql_query($query) or die("Select niet gelukt!"); while ($nieuws = mysql_fetch_array($nieuws)) { ?> <table width="420" border="1" align="center"> <tr bgcolor="#BAD1F5"> <td width="20"><?php echo $nieuws['Nieuws_ID'];?></td> <td width="160"><?php echo $nieuws['Nieuws_Titel'];?></td> <td width="240"><?php echo $nieuws['Nieuws_Bericht'];?></td> </tr> </table> <?php } ?> </body> </html><html> <head> <title><PHP Pagina</title> </head> <body> <table width="420" border="1" algin="center"> <tr> <td width="20">ID</td> <td widht="160">Titel</td> <td width="240">Bericht</td> </tr> </table> <?php mysql_connect("localhost","","") or die("kan SQL server niet selecteren"); mysql_select_db("nieuws") or die("kan database niet selecteren"); $query = "SELECT Nieuws_ID, Nieuws_Titel, Nieuws_Bericht FROM nieuwsbericht"; $nieuw = mysql_query($query) or die("Select niet gelukt!"); while ($nieuws = mysql_fetch_array($nieuws)) { ?> <table width="420" border="1" align="center"> <tr bgcolor="#BAD1F5"> <td width="20"><?php echo $nieuws['Nieuws_ID'];?></td> <td width="160"><?php echo $nieuws['Nieuws_Titel'];?></td> <td width="240"><?php echo $nieuws['Nieuws_Bericht'];?></td> </tr> </table> <?php } ?> </body> </html>[/code:1:a5d83e865e] Quote Link naar reactie
Aanbevolen berichten
Om een reactie te plaatsen, moet je eerst inloggen