Okay, men hvordan skal jeg så gøre det hvis jeg skal have det ind i sådan en kode her:
<?
if($_GET[vis] == "" OR $_GET[vis] == "normale") {
$hent = mysql_query("SELECT * FROM ting WHERE type = 'normale' ORDER BY id DESC") or die(mysql_error());
while($vis = mysql_fetch_array($hent)) {
print "<a href='vis_ting.php?id=$vis[id]'>$vis[name]</a>";
}
}
if($_GET[vis] == "nye") {
$hent = mysql_query("SELECT * FROM ting WHERE type = 'nye' ORDER BY id DESC") or die(mysql_error());
while($vis = mysql_fetch_array($hent)) {
print "<a href='vis_ting.php?id=$vis[id]'>$vis[name]</a>";
}
}
?>
<?
if($_GET['vis'] == "" OR $_GET['vis'] == "normale") {
$hent = mysql_query("SELECT * FROM ting WHERE type = 'normale' ORDER BY id DESC") or die(mysql_error());
while($vis = mysql_fetch_array($hent)) {
if (isset($vis[name])) {
print "<a href='vis_ting.php?id=$vis[id]'>$vis[name]</a><br>";
} else {
print "Ingen besked";
}
}
if($_GET['vis'] == "nye") {
$hent = mysql_query("SELECT * FROM ting WHERE type = 'nye' ORDER BY id DESC") or die(mysql_error());
while($vis = mysql_fetch_array($hent)) {
if (isset($vis[name])) {
print "<a href='vis_ting.php?id=$vis[id]'>$vis[name]</a><br>";
} else {
print "Ingen besked";
}
}
?>
burde vist kunne klare det