This is image : http://oi60.tinypic.com/118iq7r.jpg
I have a similar database structure to that shown in the table above. However, I have additional columns for the login times. I would like to take the data from the columns and display them on a page.
ID | txtName | txtEmail | txtPasswd
-------------------------------------------
1 | Ahmet | ahmet@gmail.com | 123123
2 | Ali | ali@gmail.com | 312 321
<?php
session_start();
ob_start();
include 'connect.php';
$email = $_POST['txtEmail'];
$password = $_POST['txtPasswd'];
$cryptpass = md5($password);
$login = mysql_query("select * from users where txtEmail='".$email."' and txtPasswd='".$cryptpass."' ") or die(mysql_error());
if(mysql_num_rows($login)) {
$_SESSION["login"] = true;
$_SESSION["user"] = $password;
$_SESSION["pass"] = $password;
$_SESSION["email"] = $emailadress;
header("location:index.php");
}
else
{
if($email=="" or $password=="") {
echo "";
} else {
header('Location:index.php?error=1');
exit;
}
}
ob_end_flush();
?>
This is my profile page.
<?php
if (empty($_SESSION["fullname"])) {
$fullnamequery = "";
}
if(!empty($_SESSION['login'])) {
echo '<li class="user logged">
<a href="http://www.petkod.com/hesabim/bilgilerim" title="'.$_SESSION['fullname'].'">'.$_SESSION['fullname'].'<span class="arrow"></span></a>
<div class="subMenu">
<ul>
<li><a href="http://www.petkod.com/hesabim/bilgilerim" class="info">Bilgilerim</a></li>
<li><a href="http://www.petkod.com/hesabim/petlerim" class="pet">Petlerim</a></li>
<li><a href="http://www.petkod.com/hesabim/adreslerim" class="address">Adreslerim</a></li>
<li><a href="http://www.petkod.com/hesabim/siparisler" class="order">Siparişlerim</a></li>
<li><a href="logout.php" class="logout">Çıkış</a></li>
</ul>
</div>
</li>';
}else{echo '<li class="user"><a href="popup-login.php" data-width="520" data-height="556" class="iframe">Giriş Yap</a></li>';};
?>