Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <style>
- body {
- background-color: lightblue;
- font-family: Arial, Helvetica, sans-serif;
- }
- * {
- box-sizing: border-box;
- }
- .container {
- padding: 16px;
- background-color: white;
- }
- input[type=text], input[type=password] {
- width: 100%;
- padding: 15px;
- margin: 5px 0 22px 0;
- display: inline-block;
- border: none;
- background: #f1f1f1;
- }
- input[type=text]:focus, input[type=password]:focus {
- background-color: #ddd;
- outline: none;
- }
- hr {
- border: 1px solid #f1f1f1;
- margin-bottom: 25px;
- }
- .registerbtn {
- background-color: #04AA6D;
- color: white;
- padding: 16px 20px;
- margin: 8px 0;
- border: none;
- cursor: pointer;
- width: 100%;
- opacity: 0.9;
- }
- .registerbtn:hover {
- opacity: 1;
- }
- a {
- color: dodgerblue;
- }
- .signin {
- background-color: #f1f1f1;
- text-align: center;
- }
- }
- </style>
- </html>
- <?php
- if(empty($_POST['invia'])){
- echo"<FORM ACTION='".$_SERVER['PHP_SELF']."'METHOD='POST'>";
- echo "<p><center>database_registrazione";
- echo"<fieldset>";
- echo"<legend>registrazione</legend>";
- echo"<body>";
- echo"email:<br>";
- echo"<input type='text' placeholder='email' name='email' required><br>";
- echo"password:<br>";
- echo"<input type='text' placeholder='password' name='password' required><br>";
- echo"</div>";
- echo"</fieldset>";
- echo"<br><input type='submit' value='Invia'>";
- echo "</center>";
- echo"</body>";
- echo "<br>";
- echo"<br>";
- echo"<a href=accedi(esempio).php>accedi</a>";
- echo"</TABLE></FORM>";
- }
- $con=new mysqli("localhost","root","","esempio");
- if(mysqli_connect_errno()){
- echo("connesione_non_effetuata:".mysqli_connect_errno()."<BR>");
- exit();
- }
- $email=isset($_POST['email'])?$_POST['email']:'';
- $password=isset($_POST['password'])?$_POST['password']:'';
- $sql="INSERT INTO registrazione(email,password)";
- $sql.="VALUES('".$email."','".$password."');";
- $ris=$con->query($sql) or die ("query_fallita");
- $con->close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement