Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- insert
- =================================
- Task Helper berisi
- * insert tugas ke table
- =================================
- */
- function taskInsert($data,$type)
- {
- $arType=array('t_type'=>$type);
- /*
- title, from, to, contents
- $data=array(
- 'title'=>xxxx,
- 'from'=>xxx etc,
- 'to'=>xxxx,
- 'contents'=>xxx
- );
- */
- $arType['t_detail']=json_encode($data);
- foreach($arType as $n=>$v) $$n=addslashes($v);
- $sql="insert into task (t_type,t_detail) values ('$t_types','$t_detail')";
- }//function taskInsert($data,$type)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement