elseif(isset($_POST['save'])){
$id = $_POST['id'];
$fixed = $_POST['fixed'];
mysql_query("UPDATE `tickets` SET `fixed` = '". $fixed ."' WHERE `id` = '". $id ."'") or die(mysql_error());
}
elseif($_GET['action']=="view"){
$id = (int)$_GET['id'];
$res = mysql_query("SELECT * FROM `tickets` WHERE `id` = '". $id ."'");
$row = mysql_fetch_assoc($res);
if($row['fixed']=="1"){ $fs = 'checked'; } else { $fs = ''; }
echo '
<form method="POST">
<table width="100%" id="title">
<tr>
<td>Административный раздел - Заявки - '. $row['date'] .'</td>
</tr>
</table>
<table width="100%" id="content">
<tr>
<td>'. nl2br($row['content']) .'</td>
</tr>
<tr>
<td><hr></td>
</tr>
<tr>
<td><input '. $fs .' type="checkbox" name="fixed" value="1"> Исправлено</td>
</tr>
<tr>
<td><input type="submit" value="Update changes" name="save"></td>
</tr>
</table>
</form>
';
}
Дамп $_POST'a - array(1) { ["save"]=> string(14) "Update changes"
_____________
Бесполезно просить пощады у цезаря
Фатальная ошибка : Звонок в неопределенную функцию ©