arttypeedit.php
<?php
include 'conn.php';
echo"<tr><td colspan=3 align=\"center\">日志分类管理</td></tr>";
echo"arttypeedit.php";
$sql="select * from article_type";
$result=mysql_query($sql);
$row=mysql_fetch_row($result);
$id=$_GET['id'];
while($row)
{
if($row[0]==$id)
{
echo"<tr><td><input type=\"text\" name=\"reedit\"></td>
<td><input type=\"submit\" name=\"yes\" value=\"确定\"></td>
<td><input type=\"submit\" name=\"no\" value=\"取消\"></td></tr>";
}
else
{
echo"<tr><td>$row[1]</td><td><a href=\"arttypeedit.php?id=$row[0]\">编辑</a></td><td><a href=\"arttypedel.php\">删除</a></td></tr>";
}
$row=mysql_fetch_row($result);
}
echo"<tr><td>添加分类<input type=\"text\" name=\"addat\"></td><td colspan=2 align=\"center\"><input type=\"submit\" name=\"submit\"value=\"添加\"></td></tr>";
?>
arttypedeal.php
<?php
/*编辑分类*/
include 'conn.php';
echo"<tr><td colspan=3 align=\"center\">日志分类管理</td></tr>";
echo "arttypedeal.php";
$reedit=$_POST['reedit'];
$yes=$_POST['yes'];
if(isset($yes))
{
$sql="update article_type set name='$reedit' where id= ???";
mysql_query("set names utf8");
mysql_query($sql);
}
$sql="select * from article_type";
$result=mysql_query($sql);
$row=mysql_fetch_row($result);
while($row)
{
echo"<tr><td>$row[1]</td><td><a href=\"arttypeedit.php?id=$row[0]\">编辑</a></td><td><a href=\"arttypedel.php?id=$row[0]\">删除</a></td></tr>";
$row=mysql_fetch_row($result);
}
echo"<tr><td>添加分类<input type=\"text\" name=\"addat\"></td><td colspan=2 align=\"center\"><input type=\"submit\" name=\"submit\"value=\"添加\"></td></tr>";
?>
我想问如何把arttypeedit.php中的$id传到 arttypedeal.php中
<?php
include 'conn.php';
echo"<tr><td colspan=3 align=\"center\">日志分类管理</td></tr>";
echo"arttypeedit.php";
$sql="select * from article_type";
$result=mysql_query($sql);
$row=mysql_fetch_row($result);
$id=$_GET['id'];
while($row)
{
if($row[0]==$id)
{
echo"<tr><td><input type=\"text\" name=\"reedit\"></td>
<td><input type=\"submit\" name=\"yes\" value=\"确定\"></td>
<td><input type=\"submit\" name=\"no\" value=\"取消\"></td></tr>";
}
else
{
echo"<tr><td>$row[1]</td><td><a href=\"arttypeedit.php?id=$row[0]\">编辑</a></td><td><a href=\"arttypedel.php\">删除</a></td></tr>";
}
$row=mysql_fetch_row($result);
}
echo"<tr><td>添加分类<input type=\"text\" name=\"addat\"></td><td colspan=2 align=\"center\"><input type=\"submit\" name=\"submit\"value=\"添加\"></td></tr>";
?>
arttypedeal.php
<?php
/*编辑分类*/
include 'conn.php';
echo"<tr><td colspan=3 align=\"center\">日志分类管理</td></tr>";
echo "arttypedeal.php";
$reedit=$_POST['reedit'];
$yes=$_POST['yes'];
if(isset($yes))
{
$sql="update article_type set name='$reedit' where id= ???";
mysql_query("set names utf8");
mysql_query($sql);
}
$sql="select * from article_type";
$result=mysql_query($sql);
$row=mysql_fetch_row($result);
while($row)
{
echo"<tr><td>$row[1]</td><td><a href=\"arttypeedit.php?id=$row[0]\">编辑</a></td><td><a href=\"arttypedel.php?id=$row[0]\">删除</a></td></tr>";
$row=mysql_fetch_row($result);
}
echo"<tr><td>添加分类<input type=\"text\" name=\"addat\"></td><td colspan=2 align=\"center\"><input type=\"submit\" name=\"submit\"value=\"添加\"></td></tr>";
?>
我想问如何把arttypeedit.php中的$id传到 arttypedeal.php中
