Skip to content

Instantly share code, notes, and snippets.

Created January 7, 2020 09:47
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save bonaxcrimo/a33f1194385077a1ef763c25335d51c3 to your computer and use it in GitHub Desktop.
Pesan editor di controller Penulis
public function pesaneditor($id,$paket){
$user= ambilData('users',['id_user'=>$id]);
$data['paket'] = $paket==0?'Standar':'Express';
$editor= ambilData('editor',['user_id'=>$id]);
$data['editor'] = $editor;
$data['harga'] = $paket==0?$editor->hargabiasa:$editor->hargaexpres;
$data['user'] = $user;
$data['cerpen'] = $this->db->query("select * from cerpen where id_penulis = ".$_SESSION['id'])->result();
$check = ambilData('users',['id_user'=>$_SESSION['id']]);
$this->session->set_flashdata('pesan','Saldo tidak cukup');
$_POST['id_user'] = $_SESSION['id'];
$_POST['id_editor'] = $id;
$this->session->set_flashdata('pesan','Berhasil memesan.Jika editor tidak merespon maka dalam 3 hari uang dikembalikan');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment