📄 vote.php
字号:
<html>
<head>
<title>投票</title>
<link href="css.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content" content="text/html; charset=gb2312">
</head>
<body>
<?php
$db=@mysql_connect("localhost","root","micronsky.net") or die("数据库连接失败");
mysql_select_db("vote",$db);
?>
<form method="post" action="votes.php">
<table border="1" cellpadding="2" cellspacing="0" bordercolordark="#f7f7f7" bordercolorlight="#cccccc" class="css">
<tr>
<td bgcolor="#f7f7f7">
<?php
$lld=$_GET["id"];
if ($lld) {
$sql1="select types,title from title where id=$lld";
$result1=mysql_query($sql1,$db);
if ($myrow1=mysql_fetch_array($result1)) {
echo $myrow1["title"];
}
?>
</td>
</tr>
<?php
$sql="select * from vote where lid=$lld";
$result=mysql_query($sql,$db);
if ($myrow=mysql_fetch_array($result)) {
do {
?>
<tr>
<td>
<?php
if ($myrow1["types"]=="1") {
?>
<input type="radio" name="vcount" value="<?php echo $myrow["id"]?>"><?php echo $myrow["info"]?><input type="hidden" name="jump" value="<?php echo $lld?>"><input type="hidden" name="tys" value="<?php echo $myrow1["types"]?>">
<?php
}
else {
?>
<input type="checkbox" name="vcount[]" value="<?php echo $myrow["id"]?>"><?php echo $myrow["info"]?><input type="hidden" name="jump" value="<?php echo $lld?>"><input type="hidden" name="tys" value="<?php echo $myrow1["types"]?>">
<?php
}
?>
</td>
</tr>
<?php
}
while ($myrow=mysql_fetch_array($result));
}
?>
<tr>
<td colspan="2" bgcolor="#f7f7f7" align="center"><input type="submit" name="submit" value="投票" class="inputt"> <!--<input type="button" name="button" value="查看" class="inputt" onclick="location.href='view.php?id=<?php echo $lld?>--><a href="view.php?id=<?php echo $lld?>" target="_blank">查看</a></td>
</tr>
</table>
</form>
<?php
}
?>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -