27-02-2007, 18:30
|
|
|
חבר מתאריך: 12.07.06
הודעות: 326
|
|
יצירת session
שלום,
בניתי כניסה ל admin panel אך כאשר אני נכנס לדף זה יוצר עוגיה אוטומתית....
הנה הקוד:
קוד PHP:
<?php session_start(); ?> <html> <title><head>Handesaim UPDATE SYSTEM</head></title> <body>
<iframe name="center" width="1000" height="100" border="1" frameborder="1" src="name.php"> </iframe> <br>
<?php $i=0; $connection = mysql_connect ('localhost','xxx,'yyy') or die (mysql_error ()); mysql_query("SET NAMES 'utf8'", $connection); mysql_select_db ('72768') or die (mysql_error ());
if($_SESSION['ab']="1" AND $_SESSION['cd']="2") { echo "yes! you got the session"; echo "<br> <a href='brake.php'>brake</a>"; }
else { echo "Please enter the codes.<br>"; echo "<form method='post'>"; echo "<input type='text' name='ab'>"; echo "<input type='text' name='cd'>"; echo "<br><input type='submit'>"; if(ISSET($_POST['ab']) AND ISSET($_POST['cd']) AND $_POST['ab']="1" AND $_POST['cd']="2") { $_SESSION['ab'] = 1; $_SESSION['cd'] = 2; echo "<br>Please refresh the page to enter."; } else { $i--; echo "<br>ERROR in one of the codes.<br>You have "; echo 5-$i; echo "times to try."; } }
?> </body> </html>
או שאולי בכלל הבעיה בדף brake session?
קוד PHP:
<?php session_start(); ?> <html> <body> <?php session_destroy(); ?> </body> </html>
תודה רבה.
דרך אגב כל הדברים המשונים אמורים לגרום לבלבול ולשיבוש פריצות אך זה לא הנושא ונא לא להתיחס לזה.
תודה.
|