I Posted in another forum but I'm not getting any suggestions. Hopefully you all can help me.
I have looked everywhere the past 2 days. I have flip-flopped this thing a million different ways - still no luck.
Can someone PLEASE help me and tell me what I need to do to get this thing working?
I found this script online for secure login, there was no registration page included so I have been trying to make one work.
As of now it goes from the registration page(form) to process_registration (this page) then should redirect to index.htm if it is successful. If there is no password entered, it should just say error.
I get connected to the database , "Localhost via UNIX socket" is what I get in the browser. No entries, however.
Thanks a lot
<script type="text/javascript" src="sha512.js"></script> <?php include 'db_connect.php'; if (isset($_POST['password'])) { $Username = $_POST['username']; $Email = $_POST['email']; $Password1 = $_POST['password']; $Random_Salt = hash('sha512', uniqid(mt_rand(1, mt_getrandmax()), true)); $Password = hash('sha512', $Password1.$Random_Salt); $ip = $_SERVER['REMOTE_ADDR']; $ml = $_POST['mailinglist']; $insert_stmt = $mysqli->prepare('INSERT INTO members (username, email, password, salt, ipaddress, date, mailinglist) VALUES (?, ?, ?, ?, ?, ?, ?)'); $insert_stmt->bind_param('sssssis', $Username, $Email, $Password, $Random_Salt, $ip, NOW(), $ml); $insert_stmt->execute(); header ['Location: index.htm']; } else { echo 'ERROR'; } ?>