this is a part of code php page, and i just want to load the code for one time so, when i load the page (full of code page (include the code bellow)) if the code bellow have loaded one time then the code bellow can't loaded.
I have code like this :
$notif = $userData['pemberitahuan'];
$userId = $userData['id'];
$ket = 'unread';
$update_data = array(
'pemberitahuan' => $ket
);
$this->db->where('id', $userId);
$query = $this->db->update('user', $update_data);
return ($query === true) ? true : false;
?>
So how i can load this code for one time? and doesn't loaded when the page of full code is load or refresh??
Aucun commentaire:
Enregistrer un commentaire