Üye Bilgileri
Nick:okinoks
İsim:Okan TAMUSTA
Web sayfası:
Cinsiyet:Erkek
İmza:
Konu sayısı:1
Cevap sayısı:2
Kaç günlük üye4
Son yazdığı Php kodları mesajları
kodlamayı yazdım bir bakarsanız sevinirim
Zaman2014-01-23 15:47:43
Php kodlama
Öncelikle şunu belirteyim ben dw ve php ye yeni başladım;sadece dw üzerinden bir şeyler yapa biliyorum.  Yaptığım giriş sayfasında sadece kullanıcı adı ve şifre ile giriş yaptırıp yetkisini kontrol ettire biliyorum. Benim istediğim daireno ve durumuna göre sayfaya girsin ve kendi sayfasına gitsin herkes, yani daire iki ev sahibi kendi sayfasına daire 2 kiracı kendi sayfasına gibi
kodlaması dw de aşağıdaki gibi oluyor. daire ve durum bilgisi aldıramıyorum.
ve herkes giris.php ye gidiyor.   <?php require_once('Connections/site.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")  {   if (PHP_VERSION < 6) {     $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;   }     $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);     switch ($theType) {     case "text":       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";       break;         case "long":     case "int":       $theValue = ($theValue != "") ? intval($theValue) : "NULL";       break;     case "double":       $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";       break;     case "date":       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";       break;     case "defined":       $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;       break;   }   return $theValue; } } ?> <?php // *** Validate request to login to this site. if (!isset($_SESSION)) {   session_start(); }   $loginFormAction = $_SERVER['PHP_SELF']; if (isset($_GET['accesscheck'])) {   $_SESSION['PrevUrl'] = $_GET['accesscheck']; }   if (isset($_POST['kullaniciadi'])) {   $loginUsername=$_POST['kullaniciadi'];   $password=$_POST['daireno'];   $MM_fldUserAuthorization = "yetki";   $MM_redirectLoginSuccess = "giris.php";   $MM_redirectLoginFailed = "hata.php";   $MM_redirecttoReferrer = true;   mysql_select_db($database_site, $site);     $LoginRS__query=sprintf("SELECT kullaniciadi, sifresi, yetki FROM uyeler WHERE kullaniciadi=%s AND sifresi=%s",   GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));      $LoginRS = mysql_query($LoginRS__query, $site) or die(mysql_error());   $loginFoundUser = mysql_num_rows($LoginRS);   if ($loginFoundUser) {       $loginStrGroup  = mysql_result($LoginRS,0,'yetki');  if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}     //declare two session variables and assign them     $_SESSION['MM_Username'] = $loginUsername;     $_SESSION['MM_UserGroup'] = $loginStrGroup;             if (isset($_SESSION['PrevUrl']) && true) {       $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];    }     header("Location: " . $MM_redirectLoginSuccess );   }   else {     header("Location: ". $MM_redirectLoginFailed );   } } ?> <form name="form1" method="POST" action="<?php echo $loginFormAction; ?>">   <table border="0" align="center">     <tr>       <td>Kullanıcı Adı</td>       <td>:</td>       <td><label for="kullaniciadi"></label>       <input type="text" name="kullaniciadi" id="kullaniciadi"></td>       <td>Daire No</td>       <td>:</td>       <td><label for="daireno"></label>         <select name="daireno" id="daireno">           <option>Daire 1</option>           <option>Daire 2</option>       </select></td>     </tr>     <tr>       <td>Şifresi</td>       <td>:</td>       <td><label for="sifresi"></label>       <input type="text" name="sifresi" id="sifresi"></td>       <td>Durumu</td>       <td>:</td>       <td><label for="durumu"></label>         <select name="durumu" id="durumu">           <option>Kiracı</option>           <option>Ev sahibi</option>       </select></td>     </tr>     <tr>       <td>&nbsp;</td>       <td>&nbsp;</td>       <td><input type="submit" name="button" id="button" value="Gönder"></td>       <td>&nbsp;</td>       <td>&nbsp;</td>       <td>&nbsp;</td>     </tr>   </table>   </form>
Zaman2014-01-23 15:46:48
Php Php
Kolay gelsin arkadaşlar, üye giriş sayfası yaptım üye giriş yapabiliyor ve giriş sayfasına istediğim yetki ile gidiyor. fakat benim istediğim üye giriş yaptıktan sonra her üye kendi sayfasına gitsin. örneğin ahmet ==> ahmet.php mehmet==> mehmet.php benim sayfamda hepsi giris.php ye gidiyor yardımcı olursanız sevinirim.
Zaman2014-01-22 17:13:09
Php üye giriş yönlendirme

phpkodlari.com © 2009 Herkes Php öğrenecek
Web tasarım ve eğitim kaynağınız.