🐘 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
 
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.webp

yan po attribute ng user type sa datbase 1656257415311.webp
 
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.

About this Thread

  • 116
    Replies
  • 5K
    Views
  • 13
    Participants
Last reply from:
Lianhua

Trending Topics

Online now

Members online
1,126
Guests online
1,040
Total visitors
2,166

Forum statistics

Threads
2,281,899
Posts
29,004,636
Members
1,223,690
Latest member
xtrzn
Back
Top