Thats pretty good for now. Keep working and your techniques will "evolve".
Some points to start:
1. You may want to avoid duplicate code like:
Code:
if(!isset($_SESSION["user_type"]) or $_SESSION["user_type"] != "root")
{
header("Location:/miapp/"); //Go back we aren't root or not session set yet.
}
Put it in a function called e.g. require_privilege("root");
Try to avoid duplicate code at all. When you notice you're reusing code from other files, consider defining it as a function. Not everything is a suitable function, but get used to functions.
2. After setting header('Location: ...') you should exit the script.
Otherwise the code after that may still be executed (without you having the corresponding permissions):
Code:
if(!isset($_SESSION["user_type"]) or $_SESSION["user_type"] != "root")
{
header("Location:/miapp/"); //Go back we aren't root or not session set yet.
exit;
}
3. Database Security
Code:
$query = "SELECT * FROM usuarios,tipo_usu WHERE usuarios.id_tipo = tipo_usu.id_tipo AND usuarios.user='".$user."' AND usuarios.password='".$psw."'";
SQL-Injections will occur. Avoid building your query like this. Use Prepared-Statementes. Easy, secure.

(< thanks emote -.-)
4. Templating
Think about separating your code and your html into different files. PHP is, by design, just a big template system. Your code is simple for now, but when it gets more complex, give that a try.
It's easier to work on the code without having html-tags floating all around and it's easier to work on the design without complex php-code everywhere.