以上是yp_control.php页面
还有yp_control1.php如下:
<?php
require"function.php";
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>佚凡空度后台影视发布</title>
<SCRIPT language=javascript>
<!--
function CheckForm() {
  if(document.form.title.value == '') {
    window.alert('请输入影片名称!');
    return false;
  }
  if(document.form.zhuyan.value == '') {
    window.alert('请输入主演姓名!');
    return false;
  }
  if(document.form.type.value == '') {
    window.alert('请选择影片类型!');
    return false;
  }
  if(document.form.chandi.value == '') {
    window.alert('请选择影片产地!');
    return false;
  }
  if(document.form.yuyan.value == '') {
    window.alert('请选择语言说明!');
    return false;
  }
  if(document.form.url.value == '') {
    window.alert('请输入影片播放地址!');
    return false;
  }
  if(document.form.connect.value == '') {
    window.alert('请输入剧情介绍!');
    return false;
  }
}
//-->
</SCRIPT>
<style type="text/css">
<!--
@import url("css/cs.css");
.style1 {
color: #FFFFFF;
font-weight: bold;
font-size: 14px;
}
-->
</style>
</head><body bgcolor="#E5E5E5" leftmargin="15" topmargin="60" marginwidth="0" marginheight="0">
<?php
if($_REQUEST["del"]){
        $que=@mysql_query("delete from movie where id='$del'");
        if($que){
                echo"记录删除成功";
                echo "<META HTTP-EQUIV=REFRESH CONTENT='1;URL=yp_control_1.php'>";
                exit;
                }
            else{
                echo"记录删除失败";
                echo "<META HTTP-EQUIV=REFRESH CONTENT='1;URL=yp_control_1.php'>";
                exit;
                }
        }if($_REQUEST["edit"]){
         $que1=mysql_query("select * from movie where id=$_REQUEST["edit"]");
         $array=@mysql_fetch_array($que1);
?>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><form action="yp_control_2.php" method="post" enctype="multipart/form-data" name="form" onSubmit="return CheckForm();">
      <table width="700" border="1" cellspacing="0" cellpadding="0" bordercolordark="#E0E1E4" bordercolorlight="#FFFFFF">
        <tr align="center" valign="middle">
          <td height="37" colspan="4" bgcolor="#224466"><span class="style1">佚凡空度在线宽带影院后台影视编辑</span></td>
          </tr>
        <tr>
          <td width="15%" height="25" align="center" valign="middle">影片名称:</td>
          <td width="35%" height="25" valign="middle"><input name="title" type="text" id="title" value="<?php echo $array[m_title];?>" size="30"></td>
          <td width="15%" height="25" align="center" valign="middle">导&nbsp;&nbsp;&nbsp;&nbsp;演:</td>
          <td width="35%" height="25" valign="middle"><input name="daoyan" type="text" id="daoyan" value="<?php echo $array[m_daoyan];?>" size="30"></td>
        </tr>
        <tr>
          <td width="15%" height="25" align="center" valign="middle">主&nbsp;&nbsp;&nbsp;&nbsp;演:</td>
          <td width="35%" height="25" valign="middle"><input name="zhuyan" type="text" id="zhuyan" value="<?php echo $array[m_zhuyan];?>" size="30"></td>
          <td width="15%" height="25" align="center" valign="middle">上传时间:</td>
          <td width="35%" height="25" valign="middle"><input name="time" type="text" id="time" value="<?php echo date("y-m-d H:i",time());?>" size="30"></td>
        </tr>
        <tr>
          <td width="15%" height="25" align="center" valign="middle">影片类型:</td>
          <td width="35%" height="25" valign="middle"><input name="type" type="text" id="type" value="<?php echo $array[m_type];?>" size="30"></td>
          <td width="15%" height="25" align="center" valign="middle">影片产地:</td>
          <td width="35%" height="25" valign="middle"><input name="chandi" type="text" id="chandi" value="<?php echo $array[m_zhuyan];?>" size="30"></td>
        </tr>
        <tr>
          <td width="15%" height="25" align="center" valign="middle">语言说明:</td>
          <td width="35%" height="25" valign="middle"><input name="yuyan" type="text" id="yuyan" value="<?php echo $array[m_yuyan];?>" size="30"></td>
          <td width="15%" height="25" align="center" valign="middle">片&nbsp;&nbsp;&nbsp;&nbsp;长:</td>
          <td width="35%" height="25" valign="middle"><input name="lenght" type="text" id="lenght" value="<?php echo $array[m_lenght];?>" size="8">
            分钟</td>
        </tr>
        <tr>
          <td width="15%" height="25" align="center" valign="middle">影片剧照:</td>
          <td height="25" colspan="3" valign="middle"><input name="photo" type="text" id="photo" value="<?php echo $array[m_photo];?>" size="50"></td>
        </tr>
        <tr>
          <td width="15%" height="25" align="center" valign="middle">影片地址:</td>
          <td height="25" colspan="3" valign="middle"><input name="url" type="text" id="url" value="<?php echo $array[m_url];?>" size="50"></td>
          </tr>
        <tr>
          <td width="15%" height="230" align="center" valign="middle">剧情介绍:</td>
          <td height="230" colspan="3" valign="middle"><textarea name="connect" cols="86" rows="14" id="connect"><?php echo $array[m_connect];?></textarea></td>
          </tr>
        <tr align="center" valign="middle">
          <td height="30" colspan="4"><input type=hidden name=id value="<?php echo $array[id];?>"><input name="submit" type="submit" id="submit" value="编辑提交">
            &nbsp;&nbsp;
            <input name="submit1" type="reset" id="submit1" value="全部重置"></td>
          </tr>
      </table>
    </form></td>
  </tr>
</table>
<?php
}
?>
</body>
</html>

解决方案 »

  1.   

    yp_control2.php代码如下:
    <?php
    require"function.php";$cookie_user=$HTTP_COOKIE_VARS[$cookie_name."_user"];
    $cookie_pass=$HTTP_COOKIE_VARS[$cookie_name."_pass"];
     
    /*页面有效性判断*/
    islogin($cookie_user,$cookie_pass);     
    ?>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>佚凡空度在线宽带影院后台影视发布</title>
    <style type="text/css">
    <!--
    @import url("css/a.css");
    -->
    </style>
    </head><body bgcolor="#E5E5E5" leftmargin="15" topmargin="60" marginwidth="0" marginheight="0">
    <?php
    $que=mysql_query("update movie set m_title='$title',m_zhuyan='$zhuyan',m_type='$type',m_photo='$photo',m_url='$url',m_connect='$connect',
    m_daoyan='$daoyan',m_time='$time',m_yuyan='$yuyan',m_chandi='$chandi',m_lenght='$lenght' where id=$id");
    if($que){
             echo"记录修改成功!";
             echo "<META HTTP-EQUIV=REFRESH CONTENT='1;URL=yp_control_1.php?edit=$id'>";
             exit;
            }
        else{
             echo"记录修改失败";
             echo "<META HTTP-EQUIV=REFRESH CONTENT='1;URL=yp_control_1.php?edit=$id'>";
             exit;
             }
    ?>
    </body>
    </html>
      

  2.   

    不知道哪位大哥可以帮小弟一个忙,小弟在做课程系统,这个问题小弟实在改不出来呀!help me !help me!
      

  3.   

    问题是,传递时,下面的状态栏可以看到如:yp_control.php?edit=1
    但是转到了一个空的页面!问题可能是出在:yp_control1.php
      

  4.   

    一步一步的调试了可以在适当的地方加入
    echo "Ok"; exit;看看反映。
    如果可以显示说明前面的没有问题,
    继续下,直到找到问题所在!
      

  5.   

    建议使用
    require_once("function.php");注意:虽然 后面不加分号也可以,但是最好加上
    ,问题或许就在此!