Yep man , you should use PHP + mysql , first get urself a mysql server , or instal xampp on your pc , then write script for your self

little example for log in without sql:
<?php
echo "<form method="post" action="">";
echo " Username: <input type="text" name="username"> <br/>";
echo " Password: <input type="password" name="password"> <br/>";
echo "<input type="submit" value="Log In">";
echo "<form/>";
$username = $_POST['username']
$password = $_POST['password']
if ($username == "OrX" && $password == "password") {
echo "Congrats you just logged in!";
}
else
{
echo "Gtfo nub , wrong username or pw!";
}
echo "Script by -

OrX|=-";
?>
Good luck , i could help you out with php and stuff if you need help

MSN:lauriadi@hotmail.com
-

OrX|=-