Yes, the <?php is before the function call and the ?> is after the funtion call. Here is my entire page if it helps. I'm really enjoying PHP, but I really want to get this to work. There is a lot of extra stuff in there, but it is what I have.
Also, select_field is a custom function that blows up an arry into a drop down box.
<?php
echo "<script language=\"javascript\">";
echo "function filltext(){
alert(customers.selectedIndex);
alert(customers.options[customers.selectedIndex].text);
\$query = \"select address from customers where name =\" + customers.options[customers.selectedIndex].text;
\$result = mysql_query(\$query);
\$row = mysql_fetch_array(\$result, MYSQL_ASSOC);
db.value = \$row[address];
}
</script>";
include ("header.php"

;
mysql_select_db("customers"

or
die(mysql_error());
$output = anchor_tag("
"Go here!"

;
echo "$output";
echo "<br>";
$myarray = array("name" => "MyImage", "alt" => "new image", "height" => "32", "width"=>"259", "border" => "4"

;
echo image_tag("/apache_pb.gif"

;
echo "<br>";
echo $output = image_tag("/apache_pb.gif", $myarray);
echo $output = ul_list($myarray);
print table_row(table_cell("hellow world", array("align"=>"right"

));
print $output = select_field("customers", db_values_array(customers, name), "", "onChange=\"filltext()\""

;
echo "<br>";
echo "<br>";
echo text_field(db, "", 50);
//echo "<input type = "text" name = db size = "50" value = "guestbook"><br>";
echo checkbox_field("Check yes or no", "Yes", "no", "no"

;
?>