【php开源代码栏目提醒】:网学会员为广大网友收集整理了,showtpxm.php,希望对大家有所帮助!
<?php
/*
* Created on 2006-11-15
* 显示投票项目
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse -
PHP - Code Templates
*/
?>
<HTML>
<head>
<Title>显示投票项目</Title>
<link rel="stylesheet" type="text/css" href="css/shared.css">
</head>
<body>
<div align="center">
<?php
require_once("com/db.php");
$db = new DataAccess();
$sql="select * from book_polltype";
mysql_query("set names 'gbk'");
$result=
mysql_query($
sql);
?>
<table width="50%" border="0" cellpadding="0" cellspacing="1" class="tdsectionbar">
<tr align="center">
<td width ="10%" class="tdbg2">
序号
</td>
<td width="80%" class="tdbg2">
内容
</td>
</tr>
<?php
$i = 1;
while($myarray=mysql_fetch_array($result, MYSQL_ASSOC))
{
?>
<tr>
<td align="center" class="tdbg0">
<?php echo $i; ?>
</td>
<td align="left" class="tdbg0"> <?php echo $myarray["PollTypeName"];?></td>
</tr>
<?php
$i = $i + 1;
}
?>
</table>
<br>
<br>
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr align="center">
<td align="center"><a href ="index.php">返回首页</a>
</td>
</tr>
</table>
</div>
</body>
</
HTML>