this my code
Code:
<html> <head> <title>Sign in</title> </head> <body> <h3> Island hospice</h3> <h1>Sign in</h1> <form method="post" action="<?$_SERVER['PHP_SELF'];?>"> <P>Username:</P> <p> <input name="user" type="text" ID="user"/> </p> <p>Password:</p> <p> <input name="pass" type="password" ID="pass"/> </p> <p>Email:</p> <p> <input name="email" type="text" ID="email"/> </p> <input type="submit" value="Create my account" name="submit" /> <input type="reset" value="Cancel" name="reset" /> <a href="https://bytes.com/login.php" target="_self"> Sign in here </a> <p>*</p> <?=$_SERVER['PHP_SELF'];?> <?PHP if (isset($_POST['Submit'])){ $db=@mysql_connect("localhost","root",""); mysql_select_db("island",$db); if(!$db){ echo('<p>Application not available. Try again later.</p>'); exit(); } else{ echo('<p></p>; $user=$_POST["User"]; $pass=$_POST["Pass"]; $email=$_POST["Email"]; if ($user ||$pass||$email){ $query= "INSERT INTO users VALUES('$User','$Pass','$Email')"; $result=mysql_query($query); if($result){ echo"Thank you $user.You may now"; echo('<a href ="https://bytes.com/login.php"target="_self> sign in here</a>'); } else{ echo('<p>The information you provided is invalid or the username is already taken.Please try agin!</p>'); } } else{ echo" Enter all the information!"; } } } ?> </form> </body> </html>
Comment