Welcome Guest, Not a member yet? Register   Sign In
Post data empty
#1

[eluser]ColBatGuano[/eluser]
All of my post data is empty.

I used a test controller (that I saw here somewhere)....

Code:
<?php
class Test extends CI_Controller {

  function Test()
  {
  parent::__construct();
  }
  
  function index()
  {
    echo ("<FORM action='".site_url()."/test/res' method='post'>
           <INPUT type='TEXT' name='testp'><input type='submit'></FORM>");
  }
  
  function res()
  {
    print_r($_POST);
  }
}
?>

and I get the output...

Code:
Array ( )

Running MAMP. I've also used

Code:
$this->output->enable_profiler(TRUE);

and this confirms that "No POST data exists". I don't know how to even go about debugging this! :-(


Any ideas?

thanks
#2

[eluser]skunkbad[/eluser]
Code:
echo '
  <form method="post" action="' . site_url('test/res') . '">
    <input type="text" name="yomamma" value="whatever" />
    <input type="submit" value="Submit" />
  </form>
';

By the way, this belongs in a view.
#3

[eluser]ColBatGuano[/eluser]
[quote author="skunkbad" date="1350454653"]
Code:
echo '
  <form method="post" action="' . site_url('test/res') . '">
    <input type="text" name="yomamma" value="whatever" />
    <input type="submit" value="Submit" />
  </form>
';

By the way, this belongs in a view.[/quote]

Hi Skunkbad,

Yep, I know it should be. This was the smallest example I could come up with that shows the problem.
#4

[eluser]skunkbad[/eluser]
Is it working now?
#5

[eluser]ColBatGuano[/eluser]
Same problem I'm afraid. I've got another controller & view...

Code:
<form action="/company/delete_confirmed" method="POST">
Are you sure you want to delete this record?
<input type="text" name="ID" value="1"  /><input type="text" name="name" value="dale"  /><input type="submit" name="mysubmit" value="OK"  />

</form>

The controller for this still shows 'no post values'.




Theme © iAndrew 2016 - Forum software by © MyBB