עבר עריכה לאחרונה בתאריך 04.07.07 בשעה 23:31 על-ידי MeToR (מפקח)
באתר שלי http://www.muler.co.il ...
כל מי שהיה נרשם היה מתחבר זה היה שומר לו קוקי + SESSION ...
עכשיו .. בלי שאני אגע בשום דבר .. פתאום זה לא עושה את זהזה מאוד מאוד מוזר לי ואני אשמח לעזרה
הנה הקוד שמפעיל תעסק :
<?php session_start();if ($action=='logout' AND isset($action)) { setcookie ("con1",$old_user,time()-3600*24+1); unset($_SESSION['con']); $next=true; } if (isset($action) AND $action=='register') { $cookie_c=$_POST['cookie']; $new_user=$_POST['user']; $t_pass=$_POST['pass']; $new_pass=md5($t_pass); require "sql.php"; $result = mysql_query("SELECT * FROM -- WHERE user='$new_user'" ); $row = mysql_fetch_array($result); $old_user=$row['user']; $old_pass=$row['pass']; $id=$row['id']; if ($new_user=$old_user && $new_pass=$old_pass) { if (isset ($cookie_c)) { setcookie ("con1",$old_user,time()+3600*24); echo "ok"; } $_SESSION['con']="$old_user"; echo "תיכף תועבר לדף הבית"; $next=true; } } ?> <html> <head> <script type="text/javascript"> function log() { opener.location.reload(); window.close(); } </script> <?php if (isset($next)) { ?> <script type="text/javascript"> log(); </script> <?php } ?> <link rel="stylesheet" type="text/css" href="css1.css" > </head> <body style="text-align:center ;BACKGROUND-ATTACHMENT: fixed; BACKGROUND-IMAGE: url('bg3.gif');border:0px ; color:white ;border:0px"> <br> <?php if(!isset($action)) { ?> <table id='register1' dir=ltr style="text-align:right;"> <form method='post' action="?action=register" id='reg' name='regi'> <tr> <td><input type='text' name='user'></td><td>שם משתמש</td> </tr><tr> <td><input type='password' name='pass'></td><td>סיסמא</td> </tr><tr> <td><input type='checkbox' name='cookie'> </td><td>זכור אותי</td> </tr><tr> <td colspan=2 style='text-align:left'><input type='submit' value='שלח'></td> </tr><tr> <td colspan=2><a href='?action=forgot' target='_blank'>שכחתי סיסמא</a></td> </form> </table> <?php } ?> </body> </html>
|