Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <DOCTYPE! html>
- <html lang="es">
- <head>
- <title>Universalistas</title>
- <meta charset="utf-8"/>
- </head>
- <body>
- <p>hola</p>
- <?php
- $host = "localhost";
- $user = "universalistas";
- $pass = "u12345";
- $name = "universalistas";
- $con = mysqli_connect($host, $user, $pass, $name);
- if(mysqli_connect_errno()) echo "" . mysqli_connect_error();
- if(mysqli_ping($con)) echo "ok!";
- else echo "" . mysqli_error($con);
- /*$user = "test";
- $password = "test";
- $mail = "tes@test.test";
- $name = "test";
- $lastname = "test";
- $origin = "test";
- $area = "test";*/
- $conn = new mysqli($host, $user, $pass, $name);
- $reg = mysqli_query($conn, "select * from users;");
- if($reg)
- {
- echo "<script>alert('Usuario registrado correctamente.');
- window.location.href = 'index.php';</script>";
- }
- else
- {
- echo "รo"/*"<script>alert('ยกHa ocurrido un error y no se registraron los datos!');
- window.location.href = 'index.php';</script>"*/;
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement