Salve ragazzi,
nella realizzazione del mio sito web ho riscontrato un problema che non riesco a risolvere, cercherò di essere il più sintetico possibile dandovi più dettagli possibili.
Problema: Come faccio a richiamare nella pagina classifica.php solo i primi 10 valori contenuti nel database in una tabella? (vedi screenshot di esempio)
Ed in particolare, come faccio a far visualizzare la classifica solo se una persona ha effettuato il LOGIN? Però solo la classifica! e non tutta la pagina!(vedi esempio)
Dati
Nome Database: webnet
(vabbè di solito includo il file config.php)
Nome Tabella: Utenti
Campi: Nickname || Punti|| Data registrazione
Classifica.php:
Perpiacere Aiutatemiiiiii!!Codice PHP:
<!DOCTYPE html><!-- HTML5 -->
<html lang="it" dir="ltr">
<head>
<meta charset="utf-8" />
<!--[if IE]><meta http-equiv="ImageToolbar" content="False" /><![endif]-->
<meta name="author" content="Pierpaolo W." />
<link rel="stylesheet" type="text/css" href="style/reset.css" media="screen,print" />
<link rel="stylesheet" type="text/css" href="style/print.css" media="print" />
<link rel="stylesheet" type="text/css" href="style/style.css" media="screen,print" />
<link rel="stylesheet" type="text/css" href="style/template.css" media="screen" />
<link rel="stylesheet" type="text/css" href="style/menu.css" media="screen" />
<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="style/ie.css" media="screen" /><![endif]-->
<script type="text/javascript" src="res/swfobject.js"></script>
<script type="text/javascript" src="res/jquery.js?1939"></script>
<script type="text/javascript" src="res/pippoengine.js?1939"></script>
<script type="text/javascript" src="res/pippocartengine.js?1939"></script>
<script type="text/javascript" src="res/l10n.js?1939_634888520959568907"></script>
<script type="text/javascript" src="res/x5settings.js?1939_634888520959568907"></script>
<link rel="icon" href="favicon.ico" type="image/vnd.microsoft.icon" />
<link rel="apple-touch-icon" href="http://www.jackp8cento.altervista.org/res/logo.png" />
<title>Classifica </title>
<link rel="stylesheet" type="text/css" href="pcss/classifica.css" media="screen" />
</head>
<body>
<div id="imPage">
<div id="imHeader">
<h1 class="imHidden">Classifica </h1>
<div style="position: absolute; top: 68px; left: 16px; width: 730px; height: 95px; overflow: hidden;"><script type="text/javascript">
/* <![CDATA[ */
document.write('<s'+'cript type="text/javascript" src="http://ad.altervista.org/js.ad/size=728X90/r='+new Date().getTime()+'"><\/s'+'cript>');
/* ]]> */
</script></div>
</div>
<a class="imHidden" href="#imGoToCont" title="Salta il menu di navigazione">Vai ai contenuti</a>
<a id="imGoToMenu"></a><p class="imHidden">Menu principale:</p>
<div id="imMnMn" class="auto">
<ul class="auto">
<li id="imMnMnNode0" class="imMnMnFirst">
<a href="index.php">
<span class="imMnMnFirstBg">
<span class="imMnMnTxt"><span class="imMnMnImg"></span>Home Page</span>
</span>
</a>
</li>
<li id="imMnMnNode3" class="imMnMnMiddle">
<a href="registrati.php">
<span class="imMnMnFirstBg">
<span class="imMnMnTxt"><span class="imMnMnImg"></span>Registrati</span>
</span>
</a>
</li>
<li id="imMnMnNode5" class="imMnMnMiddle imMnMnCurrent">
<a href="classifica.php">
<span class="imMnMnFirstBg">
<span class="imMnMnTxt"><span class="imMnMnImg"></span>Classifica</span>
</span>
</a>
</li>
<li id="imMnMnNode6" class="imMnMnMiddle">
<a href="risorse-utili.php">
<span class="imMnMnFirstBg">
<span class="imMnMnTxt"><span class="imMnMnImg"></span>Risorse Utili</span>
</span>
</a>
</li>
<li id="imMnMnNode7" class="imMnMnLast">
<a href="info.html">
<span class="imMnMnFirstBg">
<span class="imMnMnTxt"><span class="imMnMnImg"></span>Info</span>
</span>
</a>
</li>
</ul><script type="text/javascript">x5engine.imQueue.push_init("x5engine.utils.imPreloadImages(['menu/index_h.png','menu/registrati_h.png','menu/classifica_h.png','menu/risorse-utili_h.png','menu/info_h.png','res/imLoad.gif','res/imClose.png'])",false);</script>
</div>
<div id="imContentGraphics"></div>
<div id="imContent">
<a id="imGoToCont"></a>
<h2 id="imPgTitle">Classifica</h2>
<div style="width: 1040px; float: left;">
<div id="imCell_4" class="imGrid[0, 0]"><div id="imCellStyleGraphics_4"></div><div id="imCellStyle_4"><div id="imTableObject_4"><table class="imB0">
<tr style="height: 20px; *height: 11px;">
<td class="imW344 imVt"><p style="text-align: left;"><span class="ff1 fs18"> jnhjn</span></p></td>
<td class="imW344 imVt"><span class="fs20"> </span><p style="text-align: left;"><span class="ff1 fs18">regreg</span></p></td>
<td class="imW344 imVt"><span class="fs20"> </span><p style="text-align: left;"><span class="ff1 fs18">56</span></p></td>
</tr>
<tr style="height: 20px; *height: 11px;">
<td class="imW344 imVt"><p style="text-align: left;"><span class="ff1 fs18">egrg</span></p></td>
<td class="imW344 imVt"><span class="fs20"> </span><p style="text-align: left;"><span class="ff1 fs18">rgrege</span></p></td>
<td class="imW344 imVt"><span class="fs20"> </span><p style="text-align: left;"><span class="ff1 fs18">689</span></p></td>
</tr>
</table></div></div></div>
</div>
<div style="width: 1040px; float: left;">
<div id="imCell_5" class="imGrid[1, 1]"><div id="imCellStyleGraphics_5"></div><div id="imCellStyle_5"><div class="imHTMLObject" style="height: 450px; overflow: hidden; text-align: center;"><script type="text/javascript"> var av_gbook_lang = 'it'; </script>
<script type="text/javascript" src="http://tl.altervista.org/js/guestbook.js"></script></div></div></div>
</div>
<div id="imBtMn"><a href="index.php">Home Page</a> | <a href="registrati.php">Registrati</a> | <a href="classifica.php">Classifica</a> | <a href="risorse-utili.php">Risorse Utili</a> | <a href="info.html">Info</a> | <a href="imsitemap.html">Mappa generale del sito</a></div>
<div class="imClear"></div>
</div>
</div>
<div id="imFooterBg">
<div id="imFooter">
</div>
</div>
<span class="imHidden"><a href="#imGoToCont" title="Rileggi i contenuti della pagina">Torna ai contenuti</a> | <a href="#imGoToMenu" title="Naviga ancora nella pagina">Torna al menu</a></span>
</body>
</html>