public function store($birthday = array()) { if (is_array($birthday) & array_key_exists('name', $birthday)) { $this->name = $birthday['name']; $this->birthday = $birthday['birthday']; $sql = "INSERT INTO birthday (name,birthday)VALUES ('{$this->name}','{$this->birthday}')"; if (mysql_query($sql)) { message::set('Birthday is added successfully.'); } else { message::set('There is an error while storing birthday information, please try again.'); } } utility::redirect('index.php'); }
public function store($mobile_data = array()) { if (is_array($mobile_data) & array_key_exists('m_name', $mobile_data)) { $this->serial_id = $mobile_data['m_serial']; $this->mobile_name = $mobile_data['m_name']; $sql = "INSERT INTO mobile (mobile_serial,mobile_name)\r\n VALUES ('{$this->serial_id}','{$this->mobile_name}')"; if (mysql_query($sql)) { message::set('Mobile data is added successfully.'); } else { message::set('There is an error while storing mobile information, please try again.'); } } utility::redirect('index.php'); }
public function store($book_data = array()) { if (is_array($book_data) & array_key_exists('book_title', $book_data)) { $this->isbn = $book_data['isbn']; $this->book_name = $book_data['book_title']; $this->book_author = $book_data['book_author']; $sql = "INSERT INTO book (book_title,book_author,ISBN)VALUES ('{$this->book_name}','{$this->book_author}','{$this->isbn}')"; if (mysql_query($sql)) { message::set('Book data is added successfully.'); } else { message::set('There is an error while storing book information, please try again.'); } } utility::redirect('index.php'); }