Powdered Bread.com

Data From Form

How to get username and password from a form and then add it to a database

<?php
$username = "nameDefault";
$password = "passDefault";
?>

<form method="post">
Username <input type="text" name ="input_username" >
Password <input type="text" name="input_password"  >

<button>Register</button>

</form>
<?php

if($_POST)
{
    $username= $_POST['input_username'];
    echo "username : " . $username;
};
//enable database
global $wpdb;
$databaseName ='wp_projekte';
//$wpdb->insert( $databaseName, $data, $format );

?>