Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <form method=POST>
- input your login*          <input type="text" name='login' maxlength="20"></br>
- input your name*         <input type="text" name='name' maxlength="20"></br>
- input your secname *   <input type="text" name="secname" maxlength="20"></br>
- input your email*         <input type="text" name="email" maxlength="20"></br>
- input your password * <input type="password" name="password" maxlength="20"></br>
- <input type="submit" name='submit' value='REGISTRATION'></form>
- <?PHP
- if(isset($_POST['submit']))
- {
- if(isset($_POST['login']))
- {
- if($_POST['name'])
- {
- if($_POST['secname'])
- {
- if($_POST['email'])
- {
- if($_POST['password'])
- {
- $dbname='users';
- $dbhost='localhost';
- $dbuser="root";
- $dbpass="";
- $password=md5($_POST['password']);
- $login=$_POST['login'];
- $name=$_POST['name'];
- $secname=$_POST['secname'];
- $email=$_POST['email'];
- if($link=mysql_connect($dbhost,$dbuser,$dbpass))
- {
- if(mysql_select_db($dbname))
- {
- $zapros="INSERT into users values('$i','$name','$secname','$email','$login','$password')";
- $i++;
- if(mysql_query($zapros, $link))
- {
- echo"dear $name, your registration was finished succsessful!, your login is a $login";
- if(file_exists('login.php'))
- {
- require_once('login.php');
- }
- else
- {
- echo" the login.php does not exists";
- }
- }
- }
- else
- {
- echo "can't select database";
- }
- }
- else
- {
- echo"can't connect to database";
- }
- }
- else
- {
- echo"write a password";
- }
- }
- else
- {
- echo"write a email";
- }
- }
- else
- {
- echo "write a secname";
- }
- }
- else
- {
- echo "write a name";
- }
- }
- else
- {
- echo "write a login";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement