parse-error MySQL - PhP @ win2000

From: Date: Sat, 10 Nov 2001 20:32:26 +0000
Subject: parse-error MySQL - PhP @ win2000
Groups: php.db 
Request: Send a blank email to php-db+get-14217@lists.php.net to get a copy of this message
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 Jelle@bio-vision.nl - www.bio-vision.nl ****************** Mankind: Intelligent enough to make a strong impact on the environment, But not strong enough to make an intelligent one! ****************** ****************** Ir. Jelle G. Ferwerda Jelle@bio-vision.nl - www.bio-vision.nl ****************** Mankind: Intelligent enough to make a strong impact on the environment, But not strong enough to make an intelligent one! ******************

« previous php.db (#14217) next »