Får fejlmelding!
Kode:function aabningstider($db){
if(isset($_POST['done'])){
$t_title = $_POST['t_title'];
$t_text = $_POST['t_text'];
$sql = "update Text set t_title='".$t_title."',t_text='".$t_text."' where t_title='".$t_title."'";
mysqli_query($db,$sql) or die (mysqli_error($db));
};
$sql = "select * from Text";
$query = mysqli_query($db,$sql) or die (mysqli_error($db));
$res = mysqli_fetch_array($query);
?>
<form method="post" name="edit" style="margin-left:0%">
<h2>Opdater Åbningstider:</h2>
<table cellpadding="2" cellspacing="3" width="20%" style="color:#000;">
<tr>
<td>Titel:</td>
<td><input type="text" name="menu_title" value="<?php echo $res['t_title'];?>" /></td>
</tr>
<tr>
<td>Tekst:</td>
<td><textarea cols="40" rows="10" name="menu_text"><?php echo $res['t_text'];?></textarea></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="done" value="Opdater" /></td>
</tr>
</table>
</form><br /><br />
<?php
};
*********************************************************'
Fejl:
Notice: Undefined index: t_title in /home/web/public_html/cms/functionscms.php on line 149
************************************************************
Nogen bud? :)