Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "host";
- $username = "user_name";
- $password = "password";
- $dbname = "db_name";
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $sql = "INSERT INTO user_cache (user_name, password, email)
- VALUES ('$user_name', '$password', '$email')";
- if ($conn->query($sql) === TRUE) {
- echo " ";
- } else {
- echo "Error: " . $sql . "<br>" . $conn->error;
- }
- $conn->close();
- ?>
- <title>Rejestracja</title>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
- <link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
- <link href='//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800' rel='stylesheet' type='text/css'>
- </head>
- <body>
- <div class="w3layouts-main">
- <div class="agilesign-form">
- <div class="agileits-top">
- <form action="#" method="post">
- <div class="styled-input w3ls-text">
- <input type="text" name="user_name" required=""/>
- <label>Login</label>
- <span></span>
- </div>
- <div class="styled-input w3ls-text">
- <input type="text" name="email" required=""/>
- <label>Email</label>
- <span></span>
- </div>
- <div class="styled-input w3ls-text">
- <input type="password" name="password" required="">
- <label>Hasło</label>
- <span></span>
- </div>
- <div class="styled-input w3ls-text">
- <input type="password" name="password" required="">
- <label>Powtórz hasło</label>
- <span></span>
- </div>
- <div class="wthree-text">
- <div class="agileits-bottom">
- <input type="submit" value="Zarejestruj">
- </div>
- </form>
- </div>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement