CI4

ci form 데이터 가져오기

수수깡깡 2022. 7. 5. 09:08
728x90
반응형

# view 에서  form으로 넘긴 데이터 가져오기 

1. post 로 넘긴 데이터 

1)  $this->request->getPost("html tag name");
 2)  $_POST["html tag name"];

 

2. get로 넘긴 데이터 

1)  $this->request->getGet("html tag name");
 2)  $_GET["html tag name"];

 

<View>

<input type="text" name="id" class="form-control"  placeholder="아이디">

<Controller>

<?
// POST
$this->request->getPost("id");
$_POST["id"];

//GET
$this->request->getGet("id");
$_GET["id"];

 

728x90
반응형