Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "localhost";
- $username = "root";
- $password = "";
- $dbname = "basecoin";
- $conn = new mysqli($servername, $username, $password, $dbname);
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $sql = "INSERT INTO users (id,nombre, apellido, email, password1,password2)
- VALUES ('0','John', 'Doe', 'john@example.com','alfa','alfa')";
- if ($conn->query($sql) === TRUE) {
- echo "New record created successfully";
- } else {
- echo "Error: " . $sql . "<br>" . $conn->error;
- }
- $conn->close();
- ?>
- <html>
- <head>
- <title>
- </title>
- <source src="http://www.myersdaily.org/joseph/javascript/md5.js" type="text/javascript">
- <script type="text/javascript" src="http://www.myersdaily.org/joseph/javascript/md5.js"></script>
- <style type="text/css">
- fieldset {
- display: block;
- width: 150
- }
- input {
- display: block;
- }
- </style>
- </head>
- <body>
- <!-- <input id="text">
- <button id="hash-it">Hash it</button>
- <div id="result"></div>
- <hr>
- <input id="md5String" value="Email" />
- <br />
- <br />
- <input type="button" value="Generate md5" onclick="generatemd5()" />
- <span id="md5StringResult" />
- <br/>
- <hr>
- <br/>
- <br/>
- <h2> -->
- Formulario Global</h2>
- <fieldset>
- <legend>
- Formulario
- </legend>
- <form action="" method="post">
- Nombre:<input type="text" name="nombre" />
- Apellido:<input type="text" name="apellidos" />
- Email:<input type="text" id="md5String" name="email" />
- Password:<input type="password" name="password1"/>
- Re-Password:<input type="password" name ="password2"/>
- <input type="hidden" name="Coin">
- <input type="button" onclick="generatemd5()" Value="registrar"/>
- </fieldset>
- <br />
- <br />
- <input type="button" value="Generate md5" onclick="generatemd5()" />
- </form>
- <center>Copia esta dirección que es tu cartera virtual:<h4>
- <span id="md5StringResult" /> </h4></center>
- <!-- Queda pendiente el balance personal -->
- <script type="text/javascript">
- function generatemd5() {
- var str = document.getElementById('md5String').value;
- document.getElementById('md5StringResult').innerText = md5(str);
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement