Dag Jelle, Als je printf(); gebruikt moet je dit wel correct doen, met print(); zou het goed moeten gaan.
Dus regel 24 wordt: print ($resultaat[0]); (Excuse me muttering Dutch between the two of us :) M.vr.gr. Roel Mulder At 21:32 10-11-2001 +0100, you wrote: >Hi all, > >I have recently installed an apache server, PhP4 and MySql on my win2000 >machine (I know, I should be running linux; That will have to come with >time). But now I am trying to learn PhP - MySQL. When running the script >below I get the error message: > >Parse error: parse error in c:\phpdev\www\public\test2.php on line 25 > > >Is there anybody who knows what the problem might be? I think is in the >result display part, considering how things run properly when I leave it >out. Hopefully you ca get me going, since I do not know what I am doing wrong!! > >Thanks for the help, > >Jelle > > ><? >$host="localhost"; >$username=""; >$password=""; >$database="jelle_test"; >$table="pet"; > > >$db = mysql_connect($host) > or die ("verbinding maken met de server is mislukt"); >Echo "gefeliciteerd, de verbinding is tot stand gebracht, de handle is $db"; > > @mysql_select_db($database, $db) > or die ("Helaas geen verbinding kunnen maken met de database"); > >$sql_select = "Select * from pet"; >$result = mysql_query($sql_select, $db); >if($result) { > echo "Selectie succesvol"; > while ( $resultaat = mysql_fetch_row($result)) { > printf($resultaat[0]); >} > >mysql_close($db); >?> > > >-- > > >****************** >Ir. Jelle G. Ferwerda >[EMAIL PROTECTED] - www.bio-vision.nl Mulder Technisch Advies Postbus 69 NL-2740 AB WADDINXVEEN tel. 0182-640184 fax. 0182-640185 http://www.mta.nl -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]