beginner: why does this not work

From: Date: Fri, 02 May 2003 01:26:36 +0000
Subject: beginner: why does this not work
Groups: php.windows 
Request: Send a blank email to php-windows+get-19782@lists.php.net to get a copy of this message
Maybe a beginner question.... Could someone please explain to me why this code doesn't work? I really don't get it... Greetz Tristan. <html> <head><title>persoon administratie</title> <body> <?php //the database-connection works mysql_connect ('localhost','',''); mysql_select_db("tristan"); //selecting every colomn in the database. $query = "SELECT voornaam, achternaam, adres, adres_nr, postcode, woonplaats, telefoonnr, geslacht, notitie, id FROM persoon"; $result = mysql_query($query); //this is where my error occurs while ($rij = mysql_fetch_array($result)) { $voornaam = $rij["voornaam"]; $achternaam = $rij["achternaam"]; $adres = $rij["adres"]; $adresnr = $rij["adres_nr"]; $postcode = $rij["postcode"]; $woonplaats = $rij["woonplaats"]; $telefoonnr = $rij["telefoonnr"]; $geslacht = $rij["geslacht"]; $notitie = $rij["notitie"]; $id = $rij["id"]; print ("<center><table border='2' width='100%' bordercolor='black' cellspacing='1'>\n"); print ("<tr><td width='100%' bgcolor='white'><font size='2'>VOORNAAM: $voornaam"); print ("<tr><td width='100%' bgcolor='white'><font size='2'>ACHTERNAAM: $achternaam"); print ("<tr><td width='100%' bgcolor='white'><font size='2'>ADRES: $adres"); print ("<tr><td width='100%' bgcolor='white'><font size='2'>ADRESNR: $adresnr"); print ("<tr><td width='100%' bgcolor='white'><font size='2'>POSTCODE: $postcode"); print ("<tr><td width='100%' bgcolor='white'><font size='2'>WOONPLAATS: $woonplaats"); print ("<tr><td width='100%' bgcolor='white'><font size='2'>TELEFOONNR: $telefoonnr"); print ("<tr><td width='100%' bgcolor='white'><font size='2'>GESLACHT: $geslacht"); print ("<tr><td width='100%' bgcolor='white'><font size='2'>NOTITIE: $notitie"); print("</table></center><br><br>\n\n"); } ?> </body> </html>

« previous php.windows (#19782) next »