Nu får jeg en ny error:
Parse error: syntax error, unexpected $end in E:\\hjemmesider\\simonfv\\simonfv.wep.dk\\emneedit.php on line 65
Min kode ser sådan ud:
<html>
<head>
<title>Emne Edit</title>
<style type="text/css">
table {
margin:0px auto;
width:280px;
font-family:verdana;
font-size:12px;
}
td {
margin:2px;
padding:2px;
border:1px solid #000000;
</style>
</head>
<body>
<?php
include "connect.php";
if(isset($_GET[sletid])) {
$foresp = mysql_query("SELECT name FROM emne WHERE id = '$_GET[sletid]'");
while ($data = mysql_fetch_row($foresp)) {
echo "Er du sikker på at du vil slette emnet";
echo $data[0];
echo "?<br/>";
echo "<a href='emneedit.php?slet=$sletid'>Ja</a> ... ";
echo "<a href='emneedit.php'>Nej</a>";
}
?>
<table>
<tr>
<td>
ID
</td>
<td>
Name
</td>
<td>
Edit
</td>
<td>
Slet
</td>
</tr>
<?php
$foresp = mysql_query("SELECT id, name FROM emne");
while ($data = mysql_fetch_row($foresp)) {
echo "<tr><td>";
echo $data[0];
echo "</td><td>";
echo $data[1];
echo "</td><td>";
echo "<a href='emneedit.php?rettid=$data[0]'>Rediger</a>";
echo "</td><td>";
echo "<a href='emneedit.php?sletid=$data[0]'>Slet</a>";
echo "</td></tr>";
}
?>
</table>
</body>
</html>
EDIT: Jeg fandt selv fejlen, jeg havde misset et }. Ondskyld min lidt for hurtige udmelding.
Indlæg senest redigeret d. 07.08.2007 16:27 af Bruger #10113