Hallo,
ich wollte mir eine login skript erstellen. Ich hab es geschafft aber seit drei tagen will ich mir ne skript erstellen login+profil wenn ein user sich anmeldet dann muss er seine profil ändern können. Und auserdem jeder user soll eine eigene profil haben. Aber ich hab es leider nicht geschafft. Ich hab meine Login skript mit DW erstellt Danke
HIER ist der CODE:
login.php
profil.php
was muss ich machen wenn der user sich einloggt dann seine daten vor ihn kommt, wenn er eingeloggt ist dass soll da stehen ausloggen und profil. Ich bitte um ihr verständnis.
Danke
ich wollte mir eine login skript erstellen. Ich hab es geschafft aber seit drei tagen will ich mir ne skript erstellen login+profil wenn ein user sich anmeldet dann muss er seine profil ändern können. Und auserdem jeder user soll eine eigene profil haben. Aber ich hab es leider nicht geschafft. Ich hab meine Login skript mit DW erstellt Danke
HIER ist der CODE:
login.php
PHP:
<?php require_once('../../Connections/Tabelle.php'); ?>
<?php
// *** Validate request to login to this site.
session_start();
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($accesscheck)) {
$GLOBALS['PrevUrl'] = $accesscheck;
session_register('PrevUrl');
}
if (isset($_POST['kadi'])) {
$loginUsername=$_POST['kadi'];
$password=$_POST['pwd'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "http://localhost/imerhev/login?id=profil.php";
$MM_redirectLoginFailed = "http://localhost/imerhev/hata.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_Tabelle, $Tabelle);
$LoginRS__query=sprintf("SELECT Nickiniz, Sifreniz FROM uyeler WHERE Nickiniz='%s' AND Sifreniz='%s'",
get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password));
$LoginRS = mysql_query($LoginRS__query, $Tabelle) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
//declare two session variables and assign them
$GLOBALS['MM_Username'] = $loginUsername;
$GLOBALS['MM_UserGroup'] = $loginStrGroup;
//register the session variables
session_register("MM_Username");
session_register("MM_UserGroup");
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Unbenanntes Dokument</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.Stil1 {
font-size: 12px;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
}
.Stil2 {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
.Stil4 {font-family: Arial, Helvetica, sans-serif}
.Stil5 {font-size: 12px}
-->
</style>
</head>
<body>
<form name="form1" method="POST" action="<?php echo $loginFormAction; ?>">
<p> </p>
<div align="left"></div>
<table width="155" border="0">
<tr>
<td width="145"><div align="center" class="Stil2"><strong>Üye Adi </strong></div></td>
</tr>
<tr>
<td>
<div align="center" class="Stil4 Stil5">
<input name="kadi" type="text" id="kadi">
</div></td>
</tr>
<tr>
<td><div align="center" class="Stil2"><strong>Sifreniz : </strong></div></td>
</tr>
<tr>
<td>
<div align="center" class="Stil2">
<input name="pwd" type="text" id="pwd">
</div></td>
</tr>
<tr>
<td><div align="center">
<input name="gir" type="submit" id="gir" value="Giris">
</div></td>
</tr>
</table>
<p align="left" class="Stil1"> Hala hesabiniz yok mu? <br>
Hemen <a href="register1.php">açabilirsiniz </a>. </p>
<p align="center"> </p>
</form>
</body>
</html>
PHP:
<?php require_once('../../Connections/Tabelle.php'); ?>
<?php
mysql_select_db($database_Tabelle, $Tabelle);
$query_Recordset1 = "SELECT * FROM uyeler";
$Recordset1 = mysql_query($query_Recordset1, $Tabelle) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Unbenanntes Dokument</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.Stil4 {font-size: 12px}
.Stil9 {
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
color: #006666;
}
.Stil14 {font-weight: bold; font-size: 12px; font-family: Arial, Helvetica, sans-serif;}
.Stil17 {color: #000000}
.Stil18 {color: #000000; font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 12px; }
.Stil20 {color: #990000; font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 12px; }
-->
</style>
</head>
<body>
<form name="form1" method="POST">
<table width="284" border="0">
<tr bgcolor="#FFFFFF">
<td width="124"><div align="right" class="Stil4 Stil9 Stil17">Üye Numarasi : </div></td>
<td width="144"><input name="id" type="text" id="id" value="<?php echo $row_Recordset1['id']; ?>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><div align="right" class="Stil9 Stil4 Stil17">
<div align="right"><span class="Stil14">Adiniz : </span></div>
</div></td>
<td><input name="ad" type="text" id="ad2" value="<?php echo $row_Recordset1['Adiniz']; ?>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><div align="right" class="Stil17"><span class="Stil14">Soyadiniz : </span></div></td>
<td><input name="soyad" type="text" id="soyad2" value="<?php echo $row_Recordset1['Soyadiniz']; ?>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><div align="right" class="Stil18">
<div align="right" class="Stil14">
<div align="right">E-Mailiniz : </div>
</div>
</div></td>
<td><input name="mail" type="text" id="mail2" value="<?php echo $row_Recordset1['Mailiniz']; ?>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><div align="right" class="Stil18">
<div align="right">Dogum Tarihiniz : </div>
</div></td>
<td><input name="date" type="text" id="date2" value="<?php echo $row_Recordset1['Date']; ?>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><div align="right" class="Stil18">
<div align="right">Sehriniz : </div>
</div></td>
<td><input name="sehir" type="text" id="sehir2" value="<?php echo $row_Recordset1['Sehriniz']; ?>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><div align="right" class="Stil17"><span class="Stil14">Üye Adiniz : </span>
</div></td>
<td><span class="Stil20"><?php echo $row_Recordset1['Nickiniz']; ?></span></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><div align="right" class="Stil14">Sifreniz : </div></td>
<td><input name="pwd" type="password" id="pwd" value="<?php echo $row_Recordset1['Sifreniz']; ?>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2"><div align="center">
<input name="Submit" type="submit" value="Kayit et">
</div></td>
</tr>
</table>
</form>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
was muss ich machen wenn der user sich einloggt dann seine daten vor ihn kommt, wenn er eingeloggt ist dass soll da stehen ausloggen und profil. Ich bitte um ihr verständnis.
Danke
Zuletzt bearbeitet: