
14-02-2007, 21:43
|
|
|
|
חבר מתאריך: 13.07.06
הודעות: 326
|
|
|
בדיקת seesion
שלום,
אני רוצה לבנות מערכת לאתר שכאשר אתה נכנס הוא רוצה רק לדעת את שימך ואת האימייל שלך....
עשיתי דבר כזה:
קוד PHP:
<html> <body> <?php session_start(); if (isset($_SESSION['name'])) { //the page will be here: echo "yes"; echo "<br> <a href='brake.php'>brake</a>"; ?> //to here!!!! /*dont ever pass this !!dont ever delete any thing!!!*/ <?php } else { echo "<form method='post' action='index.php'>"; echo "The system doesnt know you.Please write your name and email. <br>"; echo "<font color='red'>Please erite your name: <br>"; echo "<input type='text' value='Name' name='name'> <br>"; echo "please erite your Email: <br>"; echo "<input type='text' value='mail' name='email'> <br>"; echo "<input type='submit' value='ok'> <br>"; echo "</font>"; echo "<br> <a href='main.php'>main manu</a>"; if(isset($_POST['name']) AND isset($_POST['email'])) { $_POST["name"]=$_SESSION['name']; $_POST["email"]=$_SESSION['email']; } else { echo "Error-You didnt fiiled all the fields"; } } ?> </body> </html>
הבעיה היא שהוא כל הזמן מראה לי כאילו לא מילאתי את זה....
תודה
|