Create a Class named Users. I have three different user roles namely, user, admin, and services. Create a unified Registration for all the users, Verify the authenticity of Email by sending verification link. Create another Login system which checks for the password and user role based on the username entered. If the password exists and if user role is admin forward page to dashboard.php, if user role is user then forward to homepage, if user role is service provider forward to homepage with additional menu called requests. The data should be restricted to each user roles. No other user role should be able to access other pages. implement it with session
<?php class Users{ //for registration of users function register($name,$email,$password,$user_role) { $conn=mysqli_connect('localhost','root','','php_db'); $query="insert into users(name,email,password,user_role) values('$name','$email','$password','$user_role')"; $result=mysqli_query($conn,$query); echo "Registration Successful"; } //verify email by sending verification link function verify($email,$name) { $link="http://localhost/php/labs/verify.php?name=$name&email=$email"; echo "Hello $name,<br> Please click on the link to verify your email:<br> <a href='$link'>click here</a>"; } //Login system function login($email,$password) { $user_role=""; $conn=mysqli_connect('localhost','root','','php_db'); $query="select * from