I downloaded a full php forum and have been removing the errors and fixing things i didnt like with it.
Theres still one thing, I am not sure how to have my passwords stored as a MD5 key. whould be great if someone could rewrite this php code to crypt passwords of people who register.
<?php
session_start();
include '../_database/database.php';
if(isset($_REQUEST['signup_button'])){
$user_email=$_REQUEST['user_email'];
$user_firstname=$_REQUEST['user_firstname'];
$user_lastname=$_REQUEST['user_lastname'];
$user_username=$_REQUEST['user_username'];
$user_password=$_REQUEST['user_password'];
$sql="INSERT INTO user(user_firstname,user_lastname,user_email,user_username,user_password,user_joindate,user_avatar,user_backgroundpicture) VALUES('$user_firstname','$user_lastname','$user_email','$user_username','$user_password',CURRENT_TIMESTAMP,'default.jpg','default.jpg')";
mysqli_query($database,$sql) or die(mysqli_error($database));
$_SESSION['user_username'] = $user_username;
header('Location: ../update-profile-after-registration.php?user_username='.$user_username);
}
?>
The register page calls for this code.