ciao a tutti,
ho trovato sul web una tag board simile a quella di forumfree/forumcommunity.
nel file log.php (sarebbe la pagina del login) vorrei modificare una cosa:
Codice:
<?php
session_start();
if ( !include("conf.php") ) {
echo "Error: Can't Run Tag.";
exit();
}
include("conf.php");
?>
<style>
<?
include("hf.css");
?>
</style>
<?
if ( $_SESSION['Name'] ) {
session_unset();
session_destroy();
}
if( !$_POST[submi] ) {
?>
<table class="skin_tbl" align="center" cellpadding="0" cellspacing="0"><tr><td class="mleft_top"></td><td><table class="mback" width="100%" cellpadding="0" cellspacing="0"><tr><td class="mback_left"></td><td class="mback_center">
<div class="mtitle">Login</div>
</td><td class="mback_right"></td></tr></table></td><td class="mright_top"></td></tr><tr><td class="mleft"></td><td><table class="mainbg" style="text-align:center;width:100%" cellpadding="4" cellspacing="1">
<form action="log.php" method="post">
<td class="ww">Nome :</td>
<td class="aa"><input type="text" name="n"></td>
<td class="ww" rowspan='2'><input type="submit" name="submi" value="Login"></td>
</tr>
<td class="ww">Password :</td>
<td class="aa"><input type="password" name="p"></td>
</tr>
</table></td><td class="mright"></td></tr><tr><td class="mleft_bottom"></td><td><table class="msub" width="100%" cellpadding="0" cellspacing="0"><tr><td class="msub_left"></td><td class="msub_center"> </td><td class="msub_right"></td></tr></table></td><td class="mright_bottom"></td></tr></table><br><br></form>
<?
}
if ( $_POST[submi] ) {
$mysql = mysql_query("SELECT Id, Nome, Password, Online, Data, Mess, Grado FROM tag_account where '$_POST[p]' = Password and '$_POST[n]' = Nome and 'Yes' = Validation") or die(mysql_error());
if ( mysql_num_rows($mysql) < 1 ) {
echo "Password o nome incorretto.<br> Controllare l'account.<br><br><a href='javascript:history.back()'>Indietro</a>";
}
else {
while ( $mysqll = mysql_fetch_array($mysql)) {
$id = $mysqll[Id];
$grado = $mysqll[Grado];
$mex = $mysqll[Mess];
}
session_start();
session_register('Name');
$_SESSION['Name'] = $_POST[n];
session_register('Password');
$_SESSION['Password'] = $_POST[p];
session_register('Id');
$_SESSION['Id'] = $id;
session_register('Grado');
$_SESSION['Grado'] = $grado;
session_register('Mess');
$_SESSION['Mess'] = $mex;
echo "Login effettuato, $_SESSION[Name] ! Sei loggato come $_SESSION[Grado] <br><br><a href='index.php'>Torna all' home</a>";
}
}
?>
La parte sottolineata mi piacerebbe metterla in una tabella.
Come faccio?
Qualcuno mi aiuta?