Ciao php-dipendenti!![]()
Ho un problema quando vado a visualizzare tutti i dati di ogni singolo utente...
...non mi da nessun errore, ma non mi visualizza nemmeno un dato!codice:<?php session_start(); if ($verified_user == '') header("Location: "); session_register("verified_user"); ?> <?php $db = mysql_connect("localhost", "xxx", "yyy"); if ($db == FALSE) die ("Errore nella connessione. Verificare i parametri nel file config.inc.php"); mysql_select_db("xxx_com", $db) or die ("Errore nella selezione del database. Verificare i parametri nel file config.inc.php"); $query = "SELECT Nick,Agilità,Vigore,Intelletto,Monete,Salute,Iscrizione,Accesso,Carica,Polis,Esperienza,Sesso,Stato,Psiche,Descrizione,Bonus,Immagine,Midi FROM pgu WHERE Nick='$user_id'"; $result = mysql_query($query, $db); $row = mysql_fetch_array($result); ?> <center> <table width="800" border="0"> <tr> <td width="200">.</td> <td width="468"> <h1><font face="Lucida Blackletter"><center>Scheda di <?php echo "$row[$Nick]"; ?></center></font></h1> <center>Nome: <?php echo "$row[Nick]"; ?> Sesso: <?php echo "$row[Sesso]"; ?> Polis: <?php echo "$row[Polis]"; ?> Carica: <?php echo "$row[Carica]"; ?> <center><table width="380" height="80" border="1"> <tr height="20"><td>Descrizione:</td></tr> <tr height="60"><td></td></tr> </table></center> <center><table width="380" border="1"> <tr> <td width="170">Agilità</td><td width="20"><?php echo "$row[Agilità]"; ?></td> <td width="170">Vigore</td><td width="20"><?php echo "$row[Vigore]"; ?></td></tr> <tr><td width="170">Intelletto</td><td width="20"><?php echo "$row[Intelletto]"; ?></td> <td width="170">Esperienza</td><td width="20"><?php echo "$row[Esperienza]"; ?></td></tr> <tr><td width="170">Psiche</td><td width="20"><?php echo "$row[Psiche]"; ?></td> <td width="170">Salute</td><td width="20"><?php echo "$row[Salute]"; ?></td></tr> <tr><td width="170">Monete</td><td width="20"><?php echo "$row[Monete]"; ?></td> <td width="170">Potere Magico</td><td width="20"><?php echo "$row[Magico]"; ?></td> </tr> </table></center> </body> </html>
Forse perchè non devo porre solamente Nick="$id_user", ma anche gli altri?
help me![]()


Nome: <?php echo "$row[Nick]"; ?>
Sesso: <?php echo "$row[Sesso]"; ?>
Polis: <?php echo "$row[Polis]"; ?>
Carica: <?php echo "$row[Carica]"; ?>
<center><table width="380" height="80" border="1">
<tr height="20"><td>Descrizione:</td></tr>
<tr height="60"><td></td></tr>
</table></center>
<center><table width="380" border="1">
<tr>
<td width="170">Agilità</td><td width="20"><?php echo "$row[Agilità]"; ?></td>
<td width="170">Vigore</td><td width="20"><?php echo "$row[Vigore]"; ?></td></tr>
<tr><td width="170">Intelletto</td><td width="20"><?php echo "$row[Intelletto]"; ?></td>
<td width="170">Esperienza</td><td width="20"><?php echo "$row[Esperienza]"; ?></td></tr>
<tr><td width="170">Psiche</td><td width="20"><?php echo "$row[Psiche]"; ?></td>
<td width="170">Salute</td><td width="20"><?php echo "$row[Salute]"; ?></td></tr>
<tr><td width="170">Monete</td><td width="20"><?php echo "$row[Monete]"; ?></td>
<td width="170">Potere Magico</td><td width="20"><?php echo "$row[Magico]"; ?></td>
</tr>
</table></center>
</body>
</html>
Rispondi quotando
VVoVe:

