Welcome Guest, Not a member yet? Register   Sign In
extract post
#1

[eluser]Unknown[/eluser]
I watched a great tutorial on youtube where a developer was able to instantly turn his post array into atomic variables by using
Code:
$this->extract($_POST).

However i get
Quote:Call to undefined method class-name::extract()

Any ideas why?
#2

[eluser]pbflash[/eluser]
The tutorial was probably for an older version. CI 2.1 automatically extracts the post vars and they can be accessed using:

Code:
$this->input->post('var_name')

See the input class section of the user guide.

http://ellislab.com/codeigniter/user-gui...input.html




Theme © iAndrew 2016 - Forum software by © MyBB