what does that mean? what are you trying to do?Altutto wrote:But is maintaining it into the /test/test folder right?
I used your code but changed the root path to what was posted above.Altutto wrote:Now it works, it shows me the text "please login"
thank you!
Please could you repeat the code that you used?
Code: Select all
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../../f/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
$user->setup();
if ($user->data['user_id'] == ANONYMOUS)
{
echo 'Please login!';
}
else
{
echo 'Thanks for logging in, ' . $user->data['username_clean'];
}
?>
why not today? it will only take you 2 minutes and then you will know.Altutto wrote:Thank you very much, I'm going to try it tomorrow
Code: Select all
<!-- INCLUDE overall_header.html -->
<h2>Fluent English</h2>
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../../f/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
$user->setup();
if ($user->data['user_id'] == ANONYMOUS)
{
echo 'Please login!';
die();
}
else
{
echo 'Logged in!';
$nomeutente="data['user_id']";
}
$connessione=mysql_connect("localhost", "altutto", "password");
$selezione_db=mysql_select_db("my_altutto", $connessione);
$progressi = "SELECT livello_ef FROM avphpbb_users WHERE id =='$nomeutente';";
$ottieni = "SELECT inglese FROM Fluent_english WHERE livello_ef=='$progressi';";
$mostra ="mysql_query($ottieni);";
if (!$ris_news) {
exit ('<p> Error!' . mysql_error() . '</p>');
}
while ($news= mysql_fetch_array($ris_news))
{
echo "<p>Traduci: ".$news['english*']."</p>" ;
}
if($_POST['traduzione']==''){echo '<form action="index.php" method="POST">
<label><input type="text" id="traduzione"></label>
<input type="submit" value="Conferma">
</form>';
}
else{ $controlla = "SELECT italiano** FROM Fluent_english WHERE livello_ef=='$progressi';";
$controllo_alternativo = "SELECT italiano_alt*** FROM Fluent_english WHERE livello_ef=='$progressi';";
if($_POST['traduzione']=='$controlla' or $_POST['traduzione']=='$controllo_alternativo'){$aggiungi = "$progressi++";
$query = "UPDATE avphpbb_users SET livello_ef='$aggiungi' WHERE id = data['user_id']"; }
else{echo 'Risposta errata!';}
}
?>
<!-- INCLUDE jumpbox.html -->
<!-- INCLUDE overall_footer.html -->