Probably a beginners error but...
| From: | Jari Ivanoff | Date: | Sun, 01 Oct 2000 20:42:40 +0000 |
| Subject: | Probably a beginners error but... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-18218@lists.php.net to get a copy of this message | ||
.. since I am a beginner... :-)
I am creating a php script that is getting some data from a MySQL database
and print out the data:
<?php
$db = mysql_connect("localhost","root");
mysql_select_db("news",$db);
$result = mysql_query("select * from news",$db);
printf("Datum: %s <br>\n", mysql_result($result,0,"datum");
printf("Klockslag: %s <br>\n", mysql_result($result,0,"tid");
printf("Rubrik: %s <br>\n", mysql_result($result,0,"rubrik");
printf("Innehåll: %s <br>\n", mysql_result($result,0,"innehall");
?>
I get this error message in my browser:
Parse error: parse error in c:\apache\htdocs\newsout.php on line 8
I get the same error message on every single one of the printf lines.
Sorry about that some of the words are in swedish..
/Jari