ai msn? o dimmelo in rpiovato ok?
*****************
altro post
Codice PHP:
<?php
$db_hostname = "localhost";
$db_username = "username";
$db_password = "password";
$db_name = "my_database";
$dbcon = mysql_connect($db_hostname, $db_username, $db_password);
mysql_select_db("$db_name");
$login = " <p><span class=\"genmed\">
<form action=\"\"method=\"post\">
<input value=\"../index.php\" name=\"redirect\" type=\"hidden\">
Username:<br /><input size=\"15\" name=\"username\" type=\"text\" class=\"post\"><br />
Password:<br /><input size=\"15\" name=\"password\" type=\"password\" class=\"post\"><br />
<br />
<input value=\"ON\" name=\"autologin\" type=\"hidden\">
<input value=\"Login\" name=\"login\" class=\"mainoption\" type=\"submit\"></form><br /><br />
<a class=\"gensmall\" href=\"forum/profile.php?mode=sendpassword\">Ho dimenticato la password</a><br />
<br />
Non hai ancora un account?<br />
Ti puoi <a href=\"forum/profile.php?mode=register\">registrare</a> gratuitamente</span>
</span></p>\n";
if (isset($HTTP_COOKIE_VARS[tfkbb2log_sid])) {
$session_id = $HTTP_COOKIE_VARS[tfkbb2log_sid];
$query = "SELECT session_id, session_user_id, session_logged_in FROM bb_sessions WHERE session_id='$session_id'";
$result = mysql_query($query, $dbcon);
$row = mysql_fetch_array($result);
if ($session_id === $row[session_id]) {
if ($row[session_logged_in] == "1") {
$query2 = "SELECT username FROM bb_users WHERE user_id='$row[session_user_id]'";
$result2 = mysql_query($query2, $dbcon);
$row2 = mysql_fetch_array($result2);
echo "Benvenuto $row2[username]";
}
else {
echo $login;
}
}
else {
echo $login;
}
}
else {
echo $login;
}
?>
fatto come ai detot tu non fugne pensa ke sem lo metti in qualsiais altra pag ti riporta sempra ad essa e non indirizza a index.php ma cmq non succed enulla in index.php cioe non esce benvenuto ecc