🐘 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
 
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
871
Guests online
2,568
Total visitors
3,439

Forum statistics

Threads
2,318,525
Posts
29,196,181
Members
1,180,972
Latest member
omac12
Back
Top