Welcome Guest, Not a member yet? Register   Sign In
POST problems
#1

[eluser]kaosweaver[/eluser]
I'm confused beyond belief. I don't know why this doesn't work:

http://www.ruralbounty.com/adsamples/test

Top form doesn't work (done in CI)

copy of top form next on the page does (done in the sandbox outside of CI)

Both go to the same center content and should have the POST contents displayed.

The (relevant lines from the) CI controller:

Code:
function test2()
    {
        $data['statez']=$this->input->post('statez');
        $this->load->view("defaultTwoColumn",$data);
    }

Code to show the post:

Code:
<?
echo '<ul>';
foreach ($_POST as $key=>$value)
{
    echo "<li>$key = $value</li>";
}
echo '</ul>';
?&gt;

Code to get the value in the page:

Code:
&lt;?=$statez;?&gt;

The rest of the posts on the site work. Obviously I'm missing something, would appreciate some help.
#2

[eluser]Sean Gates[/eluser]
I'm not sure why you loop the $_POST array, because you should be able to use the $statez variable just fine without it.

So, defaultTwoColumn is the view that has this in it?:

Code:
&lt;?=$statez;?&gt;




Theme © iAndrew 2016 - Forum software by © MyBB