iamien
06-24-03, 22:50
Ok i'm trying to make a small test script that will query my database and display the result.
<html>
<body>
<?php
$db = mysql_connect("localhost", "****", "");
mysql_select_db("emp",$db);
$test = mysql_query("SELECT name FROM employees WHERE punch = 34");
printf("Name is %s, $test);
?>
</body>
</html>
now when i try to run this, i get
Parse error: parse error, unexpected $ in /home/fritzsof/public_html/php/recall.php on line 11
only line 11 is at the end of my script and there is nothing there
no if i ocmment out the printf statemtn this goes away so i know my erro is there
What am i doing worng and/or how can i display databse query results?
<html>
<body>
<?php
$db = mysql_connect("localhost", "****", "");
mysql_select_db("emp",$db);
$test = mysql_query("SELECT name FROM employees WHERE punch = 34");
printf("Name is %s, $test);
?>
</body>
</html>
now when i try to run this, i get
Parse error: parse error, unexpected $ in /home/fritzsof/public_html/php/recall.php on line 11
only line 11 is at the end of my script and there is nothing there
no if i ocmment out the printf statemtn this goes away so i know my erro is there
What am i doing worng and/or how can i display databse query results?