prepare($sql); $hashed_password = password_hash($password, PASSWORD_DEFAULT); $stmt->bindParam(':username', $username); $stmt->bindParam(':password', $hashed_password); if ($stmt->execute()) { header("location: login.php"); } else { $error = "Something went wrong. Please try again later."; } } catch (PDOException $e) { if ($e->errorInfo[1] == 1062) { // Duplicate entry $error = "This username is already taken."; } else { $error = "Error: " . $e->getMessage(); } } $conn = null; } } ?> Register - Pet Tinder

Register

" method="post" class="mt-4">

Already have an account? Login here.