日期:2014-05-17  浏览次数:20699 次

请大侠们帮我看看这个问题出在哪?
代码如下


<!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>

<?php 
require_once 'header.php'; 
require_once 'check.php';
?>

<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Item Detail</title>
<style type="text/css">
.auto-style2 {
text-align: center;
}
.auto-style1 {
font-size: 36pt;
text-align: left;
font-family: Default;
}
.auto-style3 {
font-family: Broadway;
}
</style>
</head>

<body>
<?php
if(isset($_POST['submit_edit_item_id']))
{
$_SESSION['eidt_item_id'] = $_POST['sub_edit_item_id'];
}

$item_id = $_SESSION['eidt_item_id'];

$result = mysql_query("SELECT * FROM ITEM WHERE ITEM_ID = $item_id");

if($result)
{
$row = mysql_fetch_array($result);

$user_id = $_SESSION['id'];
$name = $row['NAME'];
$dsc = $row['DESCRIPTION'];
$auc = $row['RESERVE_PRICE'];
$bin = $row['BIN_PRICE'];
$btime = $row['BEGIN'];
$etime = $row['END'];
$status = $row['STATUS'];
$seller = $row['SELLER_ID'];
$winner = $row['WINNER_ID'];
$curr_bid = $row['CURR_BID'];
$num_bid = $row['NUM_BID'];
$img_id = $row['IMG_ID'];
}

$result = mysql_query("SELECT USER_NAME FROM USER WHERE USER_ID = $seller");
if($result)
{
$row = mysql_fetch_array($result);
$seller_name = $row['USER_NAME'];
}
?>

<table align="center" style="width: 100%">
<tr>
<td>
<div class="auto-style2">
<table align="center" style="width: 100%">
<tr>
<td class="auto-style1">Edit item:</td>
<td>
<a href="http://acadweb1.salisbury.edu/~rwan/home.php">
<img height="89" src="logo.jpg" style="float: right" width="184" /></a></td>
</tr>
</table>
</div>
<hr />
<table style="width: 100%">
<tr>
<td rowspan="2">
<?php
display_image($img_id, 500, 400);
?>

<form action="edit_item.php" method="post" enctype="multipart/form-data">
<table><tr><td><input type="file" name="image" /></td></tr>
<tr><td><input name="sub_change_pic" type="submit" value="Change picture">
<input name="sub_del_pic" type="submit" value="Delete picture"></td></tr>
</table></form>

<?php
if(isset($_POST['sub_change_pic']))
{
if(isset($_FILES['image']))
{
$file = $_FILES