Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('./inc/ses_check.php');
- require_once('./inc/mysql_connection.php');
- require_once('./inc/my_functions.php');
- if(isset($_POST['pr_action'])){
- $action=$_POST['pr_action'];
- switch($action){
- case 1://this is for add
- $username=$_POST['username'];
- $fullname=$_POST['fullname'];
- $usertype=$_POST['usertype'];
- $password=$_POST['pwd'];
- $retries=0;
- if(!isUserNameExist($username)){
- $sql="INSERT INTO tbl_users (username,fullname,pwd,retries,usertype)
- Values('$username','$fullname','$pwd',$retries,'$usertype')";
- $result=mysql_query($sql);
- header('location:user_mgmt.php');
- }else{
- echo('Username Exists');
- }
- break;
- default:
- break;
- }
- }else{
- die(mysql_error());
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement