fonksiyonlar.php sayfam şu şekilde
<?php
ob_start();
session_start();
include 'veritabani.php';
if ( isset( $_POST[ 'girisYap' ] ) )
{
$kullaniciadi = htmlspecialchars( trim( $_POST[ 'kullaniciadi' ] ) );
$sifre = htmlspecialchars( trim( md5( $_POST[ 'sifre' ] ) ) );
if ( $kullaniciadi && $sifre )
{
$kullanicisor = $db->prepare( "SELECT * from uyeler where kullaniciadi=:kullaniciadi and sifre=:sifre" );
$kullanicisor->execute(
array(
':kullaniciadi' => $kullaniciadi,
':sifre' => $sifre,
)
);
$say = $kullanicisor->rowCount();
if ( $say > 0 )
{
$_SESSION[ 'kullaniciadi' ] = $kullaniciadi;
header( 'Location:./profilim.php' );
}
else
{
header( 'Location:./index.php?status=no' );
}
}
}doğru kullanıcı bilgileriyle giriş yapıp profil sayfama yönlendiriyorum fakat sadece ilk veriyle ilgili çekiyor yani ben hangi üyeyle giriş yapsam ilk verideki bilgileri listeliyor.
buda profil.php sayfam
<?php
ob_start();
session_start();
include 'veritabani.php';
if (isset($_SESSION['kullaniciadi'])) {
} else { header("Location:index.php");}
$uye=$db->prepare("SELECT * from uyeler where uyeID=?");
$uye->execute(array(0));
$cek=$uye->fetch(PDO::FETCH_ASSOC);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title><?php echo $cek['adi'] ?></title>