Kan man gøre sårn så i buden er der
Man kan gøre sårn så man kan se flere artikler, se på www.my-city.dk/1/ der man kan kun se de 20 første artikler ellers bliver man nød til at søge efter dem andre, alså når der er skrevet 20!.. Jeg ville høre om man kunne lave en slags<1-2-3-4-5-6-7> osv så man kan se flere sider når der er skrevet over 20
Her er index.php
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<meta name="generator" content="Namo WebEditor v5.0(Trial)">
</head>
<body>
<table border="1" width="489" bordercolor="white" bordercolordark="white" bordercolorlight="white">
<tr>
<td width="475" bordercolordark="white" bordercolorlight="white"><p><font size="1"><b>Viser
20 artikler, af de skrevede: </b></font><?php
include('inc.config.php');
$query = mysql_query("SELECT * FROM news ORDER BY id DESC LIMIT 9999") or die(mysql_error());
echo mysql_num_rows($query);
$query = mysql_query("SELECT id,title,image,synopsis FROM news ORDER BY id DESC LIMIT 20") or die(mysql_error());
while ($row = mysql_fetch_assoc($query)) {
if ($i++ != 0) echo '<div class="hr"></div>';
echo '<h2><a href="news.display.php?id='.$row['id'].'">'.$row['title'].'</a></h2>';
echo empty($row['image']) ? '' : '<img src="files/'.$row['image'].'" class="image">';
echo substr($row['synopsis'],0,450);
echo ("...");
}
?>
</p>
<p> </p>
<hr>
<p align="center">| <a href="news.search.php">Søg efter artikler</a> |
<a href="http://www.my-city.dk/1/statestik.php">Statestik </a>|
<p> </p>
</td>
</tr>
</table>
<p> </p>
</body>
</html>
<SCRIPT language=JavaScript1.2>
//Disable select-text script (IE4+, NS6+)- By Andy Scott
//Exclusive permission granted to Dynamic Drive to feature script
//Visit http://www.dynamicdrive.com for this script
function disableselect(e){
return false
}
function reEnable(){
return true
}
//if IE4+
document.onselectstart=new Function ("return false")
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</SCRIPT>
<script language="javascript">
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
var EnableRightClick = 0;
if(isNS)
document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
if(EnableRightClick==1){ return true; }
else {return false; }
}
function mousehandler(e){
if(EnableRightClick==1){ return true; }
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) return false;
}
function keyhandler(e) {
var myevent = (isNS) ? e : window.event;
if (myevent.keyCode==96)
EnableRightClick = 1;
return;
}
document.oncontextmenu = mischandler;
document.onkeypress = keyhandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;
</script>