26-12-2006, 18:53
|
|
|
חבר מתאריך: 26.12.06
הודעות: 110
|
|
העמוד של הinclude
קוד PHP:
{ $reg_data = new data_base("localhost","root"); $reg_data->connect(); $reg_data->work_with("web"); if ($reg_data->is_exist("username",$user["username"],"users","string")) { echo "<center><font color='red'>בחר שם משתמש אחר, שם משתמש זה כבר רשום במערכת!</font></center>"; } elseif ($reg_data->is_exist("email",$user["email"],"users","string")) { echo "<center><font color='red'>כתובת אי-מייל כבר רשומה במערכת!</font></center>"; } else { $reg_data->add_user($user); echo ("<script language='javascript'>window.location='index.php';alert('!נרשמת בהצלחה לאתר');</script>"); } } } ?> </center> <form method="POST" action="reg.php"> <table border="0" align="center"> <tr> <td>שם פרטי:</td> <td><input type="text" name="user[fname]" value="<?php echo $user[fname];?>" dir="rtl"></td> </tr> <tr> <td>שם משפחה:</td> <td><input type="text" name="user[lname]" value="<?php echo $user[lname];?>" dir="rtl"></td> </tr> <tr> <td>שם משתמש:</td> <td><input type="text" name="user[username]" value="<?php echo $user[username];?>" dir="ltr"></td> </tr> <tr> <td>אי-מייל:</td> <td><input type="text" name="user[email]" value="<?php echo $user[email];?>" dir="ltr"></td> </tr> <tr> <td>סיסמא:</td> <td><input type="password" name="user[password]" value="<?php echo $user[password];?>"></td> </tr> <tr> <td>אימות סיסמא:</td> <td><input type="password" name="user[repass]" value="<?php echo $user[repass];?>"></td> </tr> <tr> <td colspan="2"><input type="submit" value="הרשם"><input type="reset" value="נקה טופס"></td> </tr> </table> </form> </body> </html>
|