Salve ragazzi, sono praticamente disperato, e da 2 mesi che ci lavoro, vorrei fare un regalo ad un mio per il suo compleanno "un sito" ci sono quasi ma sono fermo in questo punto.
il suo compleanno è tra 2 giorni
ho seguito questo tutorial per un login con aria protetta
miniscript.it/articoli/59/semplice_registrazione_e_login_degli_utenti.html
ora vorrei far estrapolare dei dati in una tabella
esempio: il cliente PINCO effettua il login il suo ID univoco è "25" nella tabella (users)
dovrebbe vedere soltanto ciò che hanno come valore "ID_CLIENTE" 25 nella tabella (players)
P.S. in php sono una vera frana...
Ho composto queste due righe, ma mi rendo conto che manca un pezzo dove dovrebbe fare questa funzione
ESTRAPOLA IL NUMERO "ID" DALLA TABELLA (USERS) E VAI A RICERCARE IN (PLAYERS --> ID_CLIENTE)
non so come fare!!!
codice:<?phpsession_start();require_once('lib/Users.class.php'); $login = New Users; ?> <html> <body> <body> <?php if($login->is_logged()) : ?> <div id="contenuti_protetti"> <p>Il testo contenuto in questo div sarà visualizzabile solo agli utenti loggati.</p> </div> <p> </p> <p> </p> <?php include('connect-db.php'); $result = mysql_query("SELECT * FROM players ORDER BY id DESC") or die(mysql_error()); echo "<table border='1' cellpadding='10'>"; echo "<tr> <th>Spedizione</th> <th>Data Spedizione</th> <th>Colli</th> <th>Peso</th> <th>Destinatario</th> <th>Località </th> <th>Contrassegno</th> <th>Ora e Data inserimento</th> <th>Eventuali comunicazioni</th> <th>Dettaglio</th> </tr>"; while($row = mysql_fetch_array( $result )) { echo "<tr>"; echo '<td>' . $row['id'] . '</td>'; echo '<td>' . $row['data'] . '</td>'; echo '<td>' . $row['colli'] . '</td>'; echo '<td>' . $row['peso'] . '</td>'; echo '<td>' . $row['riferimentodest'] . '</td>'; echo '<td>' . $row['localita'] . '</td>'; echo '<td>' . $row['contrassegno'] . '</td>'; echo '<td>' . $row['ora_data'] . '</td>'; echo '<td>' . $row['comunicazioni'] . '</td>'; echo '<td><a href="dettaglio.php?id=' . $row['id'] . '">Dettaglio</a></td>'; echo "</tr>"; } // chiude la tabella> echo "</table>"; ?> <?php endif; ?>
ragazzi vi prego datemi una mano


Rispondi quotando