What's new

PHP Mga IT Gods Need your help

Status
Not open for further replies.
PHP:
<?php
    echo ($row['type'] == 1 ? 'Administrator' : ($row['type'] == 2 ? 'Staff' : ($row['type'] == 3 ? 'Process Owner' : ($row['type'] == 4 ? 'Auditor' : ($row['type'] == 5 ? 'Auditor Lead' : ($row['type'] == 6 ? 'QAH' : ($row['type'] == 7 ? 'Team Management' : ($row['type'] == 8 ? 'Human Resource' : 'hahahahahahaha walang ganun dito bossing'))))))));
?>
 
PHP:
<?php
    echo ($row['type'] == 1 ? 'Administrator' : ($row['type'] == 2 ? 'Staff' : ($row['type'] == 3 ? 'Process Owner' : ($row['type'] == 4 ? 'Auditor' : ($row['type'] == 5 ? 'Auditor Lead' : ($row['type'] == 6 ? 'QAH' : ($row['type'] == 7 ? 'Team Management' : ($row['type'] == 8 ? 'Human Resource' : 'hahahahahahaha walang ganun dito bossing'))))))));
?>
cge papi try ko

PHP:
<?php
    echo ($row['type'] == 1 ? 'Administrator' : ($row['type'] == 2 ? 'Staff' : ($row['type'] == 3 ? 'Process Owner' : ($row['type'] == 4 ? 'Auditor' : ($row['type'] == 5 ? 'Auditor Lead' : ($row['type'] == 6 ? 'QAH' : ($row['type'] == 7 ? 'Team Management' : ($row['type'] == 8 ? 'Human Resource' : 'hahahahahahaha walang ganun dito bossing'))))))));
?>
awit ayaw pa din
 
Last edited:
pwede ho bang makita system niyo



[Hidden content]
oo pwede papi pero feel ko dito nagka problema kaya staff lagi ma display
1656257331414.png

naka set to 1
1656257471884.png

yan po attribute ng user type sa datbase 1656257415311.png
 

Attachments

hahahahhahaahha kaya po pala e. gumawa po muna kayo.
ay ito papi
PHP:
    if(empty($id)){
            $qry = $this->conn->query("INSERT INTO users set {$data}");
            if($qry){
                $id = $this->conn->insert_id;
                $this->settings->set_flashdata('success','User Details successfully saved.');
                $resp['status'] = 1;
            }else{
                $resp['status'] = 2;
            }

        }else{
            $qry = $this->conn->query("UPDATE users set $data where id = {$id}");
            if($qry){
                $this->settings->set_flashdata('success','User Details successfully updated.');
                if($id == $this->settings->userdata('id')){
                    foreach($_POST as $k => $v){
                        if($k != 'id'){
                            if(!empty($data)) $data .=" , ";
                            $this->settings->set_userdata($k,$v);
                        }
                    }
                    
                }
                $resp['status'] = 1;
            }else{
                $resp['status'] = 2;
            }
            
        }
 
ay ito papi
PHP:
    if(empty($id)){
            $qry = $this->conn->query("INSERT INTO users set {$data}");
            if($qry){
                $id = $this->conn->insert_id;
                $this->settings->set_flashdata('success','User Details successfully saved.');
                $resp['status'] = 1;
            }else{
                $resp['status'] = 2;
            }

        }else{
            $qry = $this->conn->query("UPDATE users set $data where id = {$id}");
            if($qry){
                $this->settings->set_flashdata('success','User Details successfully updated.');
                if($id == $this->settings->userdata('id')){
                    foreach($_POST as $k => $v){
                        if($k != 'id'){
                            if(!empty($data)) $data .=" , ";
                            $this->settings->set_userdata($k,$v);
                        }
                    }
                   
                }
                $resp['status'] = 1;
            }else{
                $resp['status'] = 2;
            }
           
        }
ibang file po ba yan

bat parang ang komplikado naman po ng codes niyo hahahaahhahahaha

madami naman pong way para mapadali yan.
 
Status
Not open for further replies.

Similar threads

Back
Top