Allora partendo dal fatto che con php non sono molto forte... mi aiuto degli strumenti forniti da dreamweaver,
in ogni pagina dove ho il form login, è presente un recordset collegato alla tabella utenti,dove prendo tutti gli elementi del database legati agli utenti che si registrano, (id_utente, nome etc),
PHP:
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_conn_ase, $conn_ase);
$query_RS_utenti = "SELECT * FROM utenti";
$RS_utenti = mysql_query($query_RS_utenti, $conn_ase) or die(mysql_error());
$row_RS_utenti = mysql_fetch_assoc($RS_utenti);
$totalRows_RS_utenti = mysql_num_rows($RS_utenti);
?>
ed il codice necessario per effettuare il login che avviene senza problemi.
Ora, per permettere all'utente loggato di poter vedere i dati della registrazione, volevo fare un link alla pagina gestione utente ma non riesco in pratica a passargli i suoi dati....
nella pagina gestione utente ho un recordest uguale a quello precedente ma filtrato per l'id_utente...
PHP:
figure class="news"> <a href="descrizione_eventi.php?codice=<?php echo $row_RS_indexeventi['id_evento']; ?> &pagina=index" class="thumb"><img src="<?php echo $row_RS_indexeventi['foto']; ?>" alt="alt"></a>
<figcaption>
<h3 class="heading"><?php echo $row_RS_indexeventi['nome']; ?></h3>
<?php $row_RS_indexeventi['descrizione'];
$stringa = $row_RS_indexeventi['descrizione'];
$stringa_tagliata = TagliaStringa($stringa, 250);
echo $stringa_tagliata?>
<a href="descrizione_eventi.php?codice=<?php echo $row_RS_indexeventi['id_evento']; ?> &pagina=index">continua >></a> </figcaption>
</figure>
<?php } while ($row_RS_indexeventi = mysql_fetch_assoc($RS_indexeventi)); ?>
questo è il codice di una altra pagina(prodotti) dove mi mostra gli ultimi prodotti inseriti nel database e se clicco sul link continua mi porta alla descrizione di ogni singolo prodotto(quindi gli passo l'id_prodotto come volevo fare prima) e nella pagina della descrizione mi mostra il nome e la descrizione del prodotto in questione, quindi pensavo di fare la stessa cosa con il link "getione utente" mi sembrava lo stesso ragionamento
Grazie e spero di essere riuscito a spiegarmi