Vote count:
0
After logging in with user email and password registered in the name of the profile page with an email appear in the database.
IMAGE : http://ift.tt/1Hcid1G
DATABASE :
ID | txtName | txtEmail | txtPasswd
-------------------------------------------
1 | Ahmet | ahmet@gmail.com | 123123
2 | Ali | ali@gmail.com | 312 321
Login.php (Action)
<?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();
And profile page :
<?php
/* CODE HERE TO BE ENTERED IN WHICH?
if (empty($_SESSION["fullname"])) {
$fullnamequery = "";
}
*/CODE HERE TO BE ENTERED IN WHICH?
if(!empty($_SESSION['login'])) {
echo '<li class="user logged">
<a href="http://ift.tt/1BSxp3V" title="'.$_SESSION['fullname'].'">'.$_SESSION['fullname'].'<span class="arrow"></span></a>
<div class="subMenu">
<ul>
<li><a href="http://ift.tt/1BSxp3V" class="info">Bilgilerim</a></li>
<li><a href="http://ift.tt/1Hcifqp" class="pet">Petlerim</a></li>
<li><a href="http://ift.tt/1BSxp3X" class="address">Adreslerim</a></li>
<li><a href="http://ift.tt/1HcifGE" 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>';};
?>
asked 30 secs ago
Mysql Profile Page
Aucun commentaire:
Enregistrer un commentaire