Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- $conn = mysql_connect("localhost", "root", "");
- mysql_select_db("proyecto_final");
- $query = "SELECT Tipo FROM registro WHERE Usuario='$usuario' AND Passw='$passw'";
- $result = mysqli_query($query);
- echo $result;
- $row = mysqli_fetch_array($result);
- if($row["Tipo"]=='Profesor'){
- header ("Location: ../principal_profe.html");
- exit();
- }
- else if($row["Tipo"]=='Admin'){
- header ("Location: ../principal_admin.html");
- exit();
- }
- else{
- header ("Location: Index.html");
- exit();
- }
- mysqli_close($conn);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement