How to make a registration form on the site?

Guys, help me make a registration form on the site, simple, login, password and e-mail in the database so that they are entered. I know what PHP is needed, but I don’t know how exactly to write code and connect to the index document (


Answer 1, authority 100%

in html:

<form action="save.php" method="post">
  <label>Login:</label><input type="text" name="data[login]" />
  <label>Pass:</label><input type="password" name="data[pass]" />
  <label>E-mail:</label><input type="text" name="data[email]" />
  <input type="submit" value="Go" />
</form>

in Save.php

<?php
   if (isset($_POST['data'])){
$data=$_POST['data'];
      $query="INSERT INTO `users` VALUES (".$data['name'].",".$data['pass'].",".$data['email'].")";
    $res=mysql_query($query,$db);
    if ($res){ print('Good!');} else { print('Insert error!');}
   }
?>

Here I did not write how to connect to the database, hash the password and other amenities. I think you’ll figure it out.