Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Record {
- protected $Conn;
- public function __construct($Conn) {
- $this->Conn = $Conn;
- }
- public function addToCrate($data){
- $query = "INSERT INTO records (user_id, title) VALUES (:user_id, :title)";
- $stmt = $this->Conn->prepare($query);
- $title = $data['title'];
- $stmt->execute(array(
- 'user_id'=>$_SESSION['user_data']['user_id'],
- 'title'=>$title
- ));
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement