אשכול: שאלה ב PHP.
View Single Post
ישן 30-04-07, 23:40   # 8
Gold-System
Permanently Banned
 
מיני פרופיל
תאריך הצטרפות: Mar 2007
הודעות: 401

Gold-System לא מחובר  

עשיתי כך -
PHP קוד:
<?php 
$x
=$_SESSION['user']; 
echo 
"Welcome back <b>".$x."</b>"
?>
ולא עובד..
הנה login.php -
קוד:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="rtl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255" />
<title>goldsystem.co.il - פאנל ניהול אתר</title>

<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<div align="center">
<h3>התחברות לפאנל הניהול</h3>	
<form method="POST" action="login.php">
      שם משתמש:
      <br />
      <input type="text" name="user">
      <br />
      ססמה:
      <br />
      <input type="password" name="password">
      <br /><br />
      <input type="submit" value="התחבר >>" name="send">
  </form>

</table>
</div>

</body>
</html>

<?php
$user = $_POST["user"];
$user = base64_encode ($user);
$user = base64_decode ($user);
$pass = $_POST["password"];
$pass = base64_encode ($pass);
$pass = base64_decode ($pass);

if (isset($_POST['send']))
 {
  if (($_POST['user'] == "almog") && ($_POST['password'] == "55555"))
   {
    echo "<center>";
    echo "התחברת בהצלחה<br>";
    echo "אנא המתן, אתה מועבר..";
    echo '<META http-equiv="Refresh" content="1; URL=Panel.php">';
   }
  else
   {
echo "<center>";
echo "<center>";
    echo "שגיאה:</b> שם משתמש או ססמה שגויים";
   }
 }
?>