|
初学php,也不知是什么问题,总是报这个错
Parse error: parse error, unexpected T_VARIABLE in D:\web\day.php on line 2
源码如下,希望有人能指点一二
<?php include("header.inc");
$result = mysql_query("SELECT * FROM cal where 'user'="$_post['name']"",$db);
$username=mysql_query("select * from user",$db);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>day</title>
</head>
<body>
<table border="1">
<caption>
<?php echo date("l dS \of F Y") ?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="name" target="_self" id="name">
<label>您的名字
<select name="select">
<?php
while ($myname = mysql_fetch_row($username)) {
printf("<option>>%s</option>\n", $myname[1]);
}
?>
</select>
</label></form>
<label>
<input type="submit" name="Submit" value="提交" />
</label>
</caption>
<tr>
<th scope="col"></th>
<th scope="col">event</th>
<th scope="col">statu</th>
</tr>
<?php
while ($myrow = mysql_fetch_row($result)) {
printf("<tr><td>%s<?td><td>%s</td><td>%s</td></tr>\n", $myrow[5], $myrow[2], $myrow[3]);
}
?>
</table>
<p>&nbsp;</p>
</body>
</html> |
|