These are my userpanel codes.
On this page, I show username and pass with session code. How can I show this user country on this page?
Thanks I have "uyeler" table. Rows are fname,lname,mail,password,country
Panel.php
<?php
include('connect.php');
session_start();
if(isset($_SESSION["kullanici"]) && isset($_SESSION["sifre"])){
/*If there are sessions for username and password */
echo "Hoşgeldiniz, ".$_SESSION["kullanici"] .$_SESSION["sifre"];
/*We wrote welcome with username */
?>
<br />
<a href="yonetim.php?cikis=1" title="Çıkış Yap">Çıkış</a>
<?php
if(isset($_GET["cikis"])){
if($_GET["cikis"]==1){
$_SESSION=array();
echo "Tüm işlemleriniz silindi.Çıkış Yaptınız.Yönlendiriliyorsunuz";
echo '<meta HTTP-EQUIV="refresh" CONTENT="1; URL=giris.php">';
}
}}else{
/*Oluşturulmamışsa giriş kısmına yönlendireceğiz.*/
echo "Çok yanlış geldin ...<br /> Yönlendiriliyorsun...";
echo '<meta HTTP-EQUIV="refresh" CONTENT="1; URL=giris.php">';
}
?>
index.php
<?php
include 'connect.php';
foreach($db->query('SELECT * FROM uyeler') as $row) {
echo $row['fname'] . "\t";
echo $row['lname'] . "\t";
echo $row['mail'] . "<br/>";
}
?>