Welcome Guest, Not a member yet? Register   Sign In
problem with input->post
#1

[eluser]taschentuch[/eluser]
hi guys i rewrite my old code with CI but i have a problem

my old code:

Code:
foreach($_POST as $k=>$v)
if($v != "uid" && $k != "uid")
if(in_array($k, $arr2))
$neu .= "$k|";
$strr = substr($neu,0,-1);

and now CI:

Code:
function setpermission()
{
$arr2 = $this->tank_auth->get_permissions_details();
foreach($this->input->post() as $k=>$v)
if($v != "uid" && $k != "uid")
if(in_array($k, $arr2))
$neu .= "$k|";

$strr = substr($neu,0,-1);
echo $strr;
}

my problem is now

foreach($this->input->post() as $k=>$v)

does not work...


Quote:A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: admin/User.php
Line Number: 34

A PHP Error was encountered
Severity: Notice
Message: Undefined variable: neu
Filename: admin/User.php
Line Number: 39


how can i do this ?

thx


Messages In This Thread
problem with input->post - by El Forum - 10-23-2009, 05:14 PM
problem with input->post - by El Forum - 10-23-2009, 07:34 PM
problem with input->post - by El Forum - 10-23-2009, 11:49 PM
problem with input->post - by El Forum - 10-24-2009, 01:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB