Ben bir kullanıcı günlükleri ve bir kullanıcı işlevi gelirse <a href='http://www...com/.../footervote.php'>Vote</a> bağlantı görünmesi için aşağıdaki kodu kullanmak çalışıyorum getEditorsList(). Tarayıcı yenilenir ise oy bağlantısı yalnızca görünür.
Ben oy bağlantı yapmak nasıl bir fikrin tarayıcınızı yenilemek zorunda kalmadan görünür?
Teşekkür peşin,
John
index.php:
<?php
require_once "header.php";
//content
include "login.php";
// more content
require_once "footer.php";
?>
Header.php:
<?php
error_reporting(0);
session_start();
require_once ('db_connect.inc.php');
require_once ("function.inc.php");
$seed="0dAfghRqSTgx";
$domain = "...com";
$editors = getEditorsList();
foreach($editors as $editor)
{
$editorids[] = $editor['loginid'];
}
if(in_array($_SESSION['loginid'], $editorids))
{
echo "<div class='footervote'><a href='http://www...com/.../footervote.php'>Vote</a></div>";
}
?>
login.php:
<?php
if (!isLoggedIn())
{
if (isset($_POST['cmdlogin']))
{
if (checkLogin($_POST['username'], $_POST['password']))
{
show_userbox();
} else
{
echo "Incorrect Login information !";
show_loginform();
}
} else
{
show_loginform();
}
} else
{
show_userbox();
}
?>