Hvorfor opdatere den ikke mysql?
<?phpinclude_once("mysql.php");
$q1 = mysql_query("select * from xits_sider where id = '$_GET[id]'");
$edit = mysql_fetch_array($q1);
{
if($_GET['a'] == "ok"){
mysql_query("update xits_sider set overskrift = '$_POST[overskrift]', indehold = '$_POST[indhold]' where id = '$_GET[id]'");
}
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body bgcolor="#6A96C4">
<form name="form1" method="post" action="index.php?a=ok&id=<?php print $edit['id'] ?>">
<table width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse" border="1" borderColor="#000000">
<tr>
<th bgcolor="#84B0DD">Rediger "<?php print $edit['navn'] ?>"</th>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="30%" align="right"><strong>Overskrift:</strong></td>
<td width="70%"><input name="overskrift" type="text" value="<?php print $edit['overskrift'] ?>" /></td>
</tr>
<tr>
<td align="right" valign="top"><strong>Indhold:</strong></td>
<td><textarea name="indhold" cols="40" rows="15"><?php print $edit['indhold'] ?></textarea></td>
</tr>
<tr>
<td align="right" valign="top"> </td>
<td><input name="submit" type="submit" id="submit" value="Gem"></td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#84B0DD"> </td>
</tr>
</table>
</form>
</body>
</html>
<?php
}
?>