<html dir="rtl"> <head><title>הרשמה</title></head> <form action="registard.php" method="post"> <body> <h1 align="center">הרשמה</h1> <table cellspacing="1" style="border: 1px dotted black;" cellpadding="0" bgcolor="aqua"> <tr> <th width="100px"><font color="black" face="david" size="2">שם משתמש</font></th><td><input type="text" style="font-size:10px;font-weight: bold;" name="username" /></td> </tr> <tr> <th width="100px"><font color="black" face="david" size="2">סיסמא</font></th><td><input type="password" style="font-size:10px;font-weight: bold;" name="pass" /></td> </tr> <tr> <th width="100px"><font color="black" face="david" size="2">אימייל</font></th><td><input type="text" style="font-size:10px;font-weight: bold;" name="email" /></td> </tr> <tr> <td><input type="submit" value="registar" /><input type="reset" value="clean" /></td> </tr> </body> </form> </html>
<?php if (!isset($_POST{"submit"})){ header("location: test.php"); }else{ $username=$_POST{'username'}; $password=md5($_POST{'pass'}); $email=$_POST{'email'}; $conn=mysql_connect("*","*","*") or die(mysql_error()); mysql_select_db("portal",$conn); mysql_query("INSERT into users (username,password,email) VALUES('$username','$password','$email')",$conn) or die(mysql_error()); echo "נרשמת בהצלחה"; } ?>
|
|