Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zhelinskyy/c3d0e24bf9f211982d513886a69d2441 to your computer and use it in GitHub Desktop.
Save zhelinskyy/c3d0e24bf9f211982d513886a69d2441 to your computer and use it in GitHub Desktop.
<?php if (!defined('BASEPATH'))
exit('No direct script access allowed');
/**
* @author ([email protected])
* @copyright 2017 CodeIgniter
*/
class Create_item extends Public_Controller
{
public function __construct()
{
parent::__construct();
}
public function createIptem($name,$price){
$data = array();
$data['name'] = $name;
$data['price'] = $price;
$this->load->view('registered','data'=>$data);
}
// на /Create_item грузиться index по замовчуванню
public function index()
{
$this->createItem($this->input->post('name'),$this->input->post('price'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment