Of course it didn't work, the example I gave you was just that, an example. First you have to create a form that has all of the input fields you want. The "name=''" part of the input type is the variable name you're going to use when inserting the data into the database. So when you insert the information, the query should look more like this:
"INSERT INTO users (username, password, userid, userlevel, email, timestamp, firstname, lastname) VALUES('$username', '$password', '$userid', '$userlevel', '$email', 'NOW()', '$firstname', '$lastname'";
If the userid field is an auto_increment field then just replace '$userid' with ''.