Welcome Guest, Not a member yet? Register   Sign In
why is post data not present
#1

[eluser]codeigniterzzz[/eluser]
Here is the view file:

Code:
<form action = "http://yoinko.com/locker_settingstwo/processform" method = "POST">
   <div class = "lockersettingstwodiv">
    <h2>&lt;?php echo $this->session->userdata('labelname'); ?&gt;</h2>
    <p> Control who can view/ReGemz the collection in this locker </p>
    &lt;input type = "text" name = "testing" value = "" /&gt;
    &lt;input type="radio" name="permission" value="1" /&gt; Public - Others can view/edit this locker<br/>
    &lt;input type="radio" name="permission" value="2" /&gt; Me Only - Only you can view/edit this locker<br/>
    &lt;input type="radio" name="permission" value="custom" /&gt; Custom - Locked to everyone, meaning only friends I choose can view/edit this locker<br/>
   </div>
    &lt;input type="submit" name = "Next" value="Next" class="btn btn-large btn-primary" /&gt;
    &lt;input type="submit" name = "Cancel" value="Cancel" class="btn btn-large btn-primary" /&gt;
  &lt;/form&gt;

and here is the controller/method that receives the form's post.

Code:
function processform()
{
    echo $_SERVER['REQUEST_METHOD'];
}

now why is it printing GET instead of POST??? because clearly the form is posting...I have no idea why this is happening, and any help suggestions would be appreciated...thanks.
#2

[eluser]InsiteFX[/eluser]
Code:
function processform()
{
    $data = $this->input->post(NULL, TRUE);

    var_dump($data);
}
#3

[eluser]codeigniterzzz[/eluser]
it prints bool(false). so what does that mean.
#4

[eluser]InsiteFX[/eluser]
It means your not getting any post data back.

Try this one
Code:
function processform()
{
    $data = $this->input->post();

    var_dump($data);
}
#5

[eluser]codeigniterzzz[/eluser]
EXACTLY...but why is that since I'm clearly posting...
#6

[eluser]InsiteFX[/eluser]
It may be pointing to the wrong url double check your url.

Try the one above I just added.
#7

[eluser]codeigniterzzz[/eluser]
prints bool(false)
#8

[eluser]InsiteFX[/eluser]
What is your base_url set to in ./application/config/config.php
#9

[eluser]codeigniterzzz[/eluser]
and if its the wrong url, then it would say 404 not found or redirect to different existing page...but it clearly pointing to right url because its printing the variable dump...
#10

[eluser]codeigniterzzz[/eluser]
its empty, ''. but i know its redirecting to right url because its printing the var dump and if you inspect in chrome it shows the right url..




Theme © iAndrew 2016 - Forum software by © MyBB