Created
June 16, 2017 07:41
-
-
Save zhelinskyy/c3d0e24bf9f211982d513886a69d2441 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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