PHP profil oluşturma

  • Konuyu başlatan Konuyu başlatan nomaxx
  • Başlangıç tarihi Başlangıç tarihi

nomaxx

Öğrenci
Katılım
24 Ağustos 2013
Mesajlar
74
Reaksiyon puanı
0
Puanları
0
Merhaba arkadaşlar bir üye profili oluşturmak istiyorum. index.php?id=$id şeklinde oluşturuyorum bu profil sayfasını istediğim şey ise şu:

index.php?id=$id buradaki $id üyenin id'sine eşit değilse sadece <?php echo "ismi:$ad <br/> soyad:$soyad <br/>mail: $mail <br/>Kullanici adi :$kullaniciadi </br/>"?> bu kısım çalışacak.

eğer index.php?id=$id -> $id üyenin id'sine eşitse hepsi çalışacak. Lütfen yardım edin tıkandım burada.

Elimdeki kod şu şekilde:

Kod:
<?php 
include ("vt.php");
$siteadi = "best.com";
session_start();
ob_start();
if(!$_SESSION["login"]){
	
	header("location:giris.php");
	
	}elseif($_SESSION["login"]){
		
		
		$id = intval($_GET['id']);


// id degeri ile uyeno yu eşleştirdik simdi verileri alıcaz
		$profil= mysql_query("select * from uyeler where uyeno = $id"); 


		$yaz = mysql_fetch_array($profil);
		$ad = $yaz['uyeadi2'];
		$soyad = $yaz['soyadi'];
		$mail = $yaz['email'];
		$kullaniciadi = $yaz['uyeadi'];
		
?>
<title><?php echo "$siteadi"; ?> - <?php echo $_SESSION["kullaniciadi"]; ?> Hosgeldiniz</title> 
<table width="100%" border="1"> 
  <tr> 
    <td><a href="sifredegistirme.php">Sifre Degisin</a></td> 
    <td><a href="emaildegistirme.php">E-posta Degisin</a></td> 
    <td><a href="arkadas/gelenteklifler.php">Arkadas Ekleme</a></td> 
    <td><a href="cikis.php">Çikis Yap</a></td> 
  </tr> 
</table> 
<?php echo "ismi:$ad <br/> soyad:$soyad <br/>mail: $mail <br/>Kullanici adi :$kullaniciadi </br/>"?>
<?php } ?>
 

ugurturhal

Asistan
Katılım
10 Mayıs 2010
Mesajlar
194
Reaksiyon puanı
1
Puanları
16
Merhaba arkadaşlar bir üye profili oluşturmak istiyorum. index.php?id=$id şeklinde oluşturuyorum bu profil sayfasını istediğim şey ise şu:

index.php?id=$id buradaki $id üyenin id'sine eşit değilse sadece <?php echo "ismi:$ad <br/> soyad:$soyad <br/>mail: $mail <br/>Kullanici adi :$kullaniciadi </br/>"?> bu kısım çalışacak.

eğer index.php?id=$id -> $id üyenin id'sine eşitse hepsi çalışacak. Lütfen yardım edin tıkandım burada.

Elimdeki kod şu şekilde:

Kod:
<?php 
include ("vt.php");
$siteadi = "best.com";
session_start();
ob_start();
if(!$_SESSION["login"]){
    
    header("location:giris.php");
    
    }elseif($_SESSION["login"]){
        
        
        $id = intval($_GET['id']);


// id degeri ile uyeno yu eşleştirdik simdi verileri alıcaz
        $profil= mysql_query("select * from uyeler where uyeno = $id"); 


        $yaz = mysql_fetch_array($profil);
        $ad = $yaz['uyeadi2'];
        $soyad = $yaz['soyadi'];
        $mail = $yaz['email'];
        $kullaniciadi = $yaz['uyeadi'];

if ( $_SESSION["kullaniciadi"] == $kullaniciadi ):
        
?>
<title><?php echo "$siteadi"; ?> - <?php echo $_SESSION["kullaniciadi"]; ?> Hosgeldiniz</title> 
<table width="100%" border="1"> 
  <tr> 
    <td><a href="sifredegistirme.php">Sifre Degisin</a></td> 
    <td><a href="emaildegistirme.php">E-posta Degisin</a></td> 
    <td><a href="arkadas/gelenteklifler.php">Arkadas Ekleme</a></td> 
    <td><a href="cikis.php">Çikis Yap</a></td> 
  </tr> 
</table> 
<?php

else
echo "ismi:$ad <br/> soyad:$soyad <br/>mail: $mail <br/>Kullanici adi :$kullaniciadi </br/>"
endif;
}
?>

Şeklinde olması gerek...
 
Üst