ciao gta3 grazie per l'aiuto, la mia pagina del login e cosi:
codice:
<style type="text/css">
<!--
.Stile1 {font-size: 12px}
.Stile2 {
color: #FF0000;
font-weight: bold;
}
-->
</style>
<form action="checklogin.php" method="post">
<table width="194" border="0" align="" cellpadding="0" cellspacing="1" bgcolor="">
<tr>
<td width="188"><table width="81%" border="0" cellpadding="3" cellspacing="1" bgcolor="">
<tr>
<td colspan="3"><div align="center" class="Stile2">
<div align="center">Login</div>
</div></td>
</tr>
<tr>
<td width="1"></td>
<td width="15"></td>
<td width="152"><input name="myusername" type="text" id="myusername" value="Username" size="20" maxlength="20" /></td>
</tr>
<tr>
<td></td>
<td></td>
<td><input name="mypassword" type="password" id="mypassword" value="Password" size="20" maxlength="10" /></td>
</tr>
<tr>
<td></td>
<td></td>
<td><input name="Submit" value="Login" type="submit" /></td>
</tr>
<tr>
<td></td>
<td></td>
<td><span class="Stile1">Registrati Qui</span> </td>
</tr>
</table>
</td>
</tr>
</table>
dove dovrei mettere questo codice:
codice:
<?php
// recuperi tutti i dati...
query=mysql_query("SELECT id FROM utenti WHERE username='$username_inserito_dall'user'");
$row = mysql_fetch_array();
$uid = $row['id'];
setcookie('user_id',$uid);
?>
??