kode hvordan?
bruger den her et andet sted?if($kodeord == \"123\"){
Men hvor skal den ind??
$database = mysql_connect(\"localhost\",\"dipz_dk\",\"kode\");
mysql_select_db(\"dipz_dk_db\",$database);
if ($action == edit){
$res = mysql_query(\"UPDATE nyheder SET overskrift=\'$overskrift\',dato=\'$dato\',tekst=\'$tekst\' where id=\'$id\'\");
if ($res){ print \"Opdateret! <br>\";}
else { print \"Fejl! <br>\";}
}
$foresp = mysql_query(\"SELECT * FROM nyheder where id=\'$id\' ORDER BY dato DESC LIMIT 0,3\") or die(mysql_error());
$data = mysql_fetch_array($foresp);
$dato = $data[\"dato\"];
$overskrift = $data[\"overskrift\"];
$tekst = $data[\"tekst\"];
echo \"<form action=\".$PHP_SELF.\" method=post target=_self>\";
echo \"<input type=text cols=\\\"250\\\" name=overskrift value=\\\"\".$overskrift.\"\\\">\";
echo \"<textarea rows=\\\"7\\\" name=\\\"S1\\\" cols=\\\"30\\\">\".$tekst.\"</textarea\";
echo \"<input type=hidden name=id value=\\\"\".$id.\"\\\">\";
echo \"<input type=hidden name=action value=edit>\";
echo \"</form>\";
?>