<?php
    include'connection.php';
    $uid=$_GET['id'];
    $subid=substr($uid,0, 2);
    if($subid=="AD")
    {
        session_start('admin');
        $_SESSION['admin']=$uid;
        header('location:Admin/index.php');
    }
    elseif($subid=="MU")
    {
        session_start('master');
        $_SESSION['master']=$uid;
        header('location:Master/index.php');
    }
    elseif($subid=="DU")
    {
        session_start('distributer');
        $_SESSION['distributer']=$uid;
        header('location:Distributers/index.php');
    }
    elseif($subid=="RU")
    {
        session_start('retailer');
        $_SESSION['retailer']=$uid;
        header('location:Retailers/index.php');
    }
    elseif($subid=="AU")
    {
        session_start('api');
        $_SESSION['api']=$uid;
        header('location:Api/index.php');
    }
   

?>