CodeIgniter Forums
No $_POST data - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: No $_POST data (/showthread.php?tid=19357)

Pages: 1 2 3 4


No $_POST data - El Forum - 07-04-2009

[eluser]justinm715[/eluser]
If I change my action (see my post above) to test.php (a file I made outside the CI installation and my site), the $_POST array is populated and displayed appropriately. However, when I send the form to a CI controller for processing, the $_POST data are lost. What's going on?


No $_POST data - El Forum - 07-04-2009

[eluser]slowgary[/eluser]
bhogg,

There's a decent windows app called Beyond Compare that does byte by byte comparisons of files and folders. It might help to track down your offender.


No $_POST data - El Forum - 07-04-2009

[eluser]John_Betong[/eluser]
[quote author="justinm715" date="1246741754"]I'm actually experiencing a very similar problem.

Here is a test form:

Code:
<form method="post" action="invest/processInvestInterest">
    <input type="text" name="word" />
    <input type="hidden" name="submitAttempted" value="true" />
    <input type="submit" name="submit" value="go" />
</form>
...
...
...
[/quote]
 
I was intrigued to know if it was working on my setup so tried the above and it did not work.
 
My SOLUTION:
The above path quoted is relative, I made it specific and the code works fine.
 
 
 


No $_POST data - El Forum - 07-05-2009

[eluser]justinm715[/eluser]
OMG JOHN I LOVE YOU.


No $_POST data - El Forum - 07-06-2009

[eluser]DiRN[/eluser]
Anyone come up with a real solution for this yet? I set up a new development environment (CodeIgniter 1.6.3) today and am experiencing this same problem. I set up the following test:
Code:
<html>
<head></head>
<body>
<?php var_dump($_POST); ?>
<form method="post">
<input type="text" name="field" value="value" />
<input type="submit" />
</form>
<form method="post" action="/user/post">
<input type="text" name="field" value="value" />
<input type="submit" />
</form>
</body>
</html>

Clicking the first submit results in:
Code:
array(1) { ["field"]=>  string(5) "value" }

Clicking the second (a CodeIgniter URL) results in:
Code:
array(0) { }

The one big change in the environment is our development environments normally run in either FreeBSD or Ubuntu (depending on the day the were built), whereas this one is WAMP (WampServer 2.0h).


No $_POST data - El Forum - 07-06-2009

[eluser]John_Betong[/eluser]
[quote author="justinm715" date="1246852708"]OMG JOHN I LOVE YOU.[/quote]
 
You made me blush Smile
 
'glad to be of help.
 
Stick with CI and you will be well rewarded.
 
 
 


No $_POST data - El Forum - 07-06-2009

[eluser]John_Betong[/eluser]
[quote author="DiRN" date="1246917407"]Anyone come up with a real solution for this yet? I set up a new development environment (CodeIgniter 1.6.3) today and am experiencing this same problem. I set up the following test:
Code:
...
...
...
[quote]
Can you drop the following code into your view and let us know the results:
Code:
<?= 'getcwd() === '  .getcwd() ?>
 
 


No $_POST data - El Forum - 07-06-2009

[eluser]DiRN[/eluser]
I will try it when I get to the office tomorrow.

Here's what little other information I have. As best I can tell, everything not involving a POST is working. And User::post() looks as follows:
Code:
function post() { var_dump($_POST); }



No $_POST data - El Forum - 07-07-2009

[eluser]DiRN[/eluser]
Code:
getcwd()
returns
Code:
C:\wamp\www



No $_POST data - El Forum - 07-07-2009

[eluser]John_Betong[/eluser]
[quote author="DiRN" date="1246994836"]
Code:
getcwd()
returns
Code:
C:\wamp\www
[/quote]
 
My setup is CodeIgniter 1.71 on WAMP for Windows XP. I notice your CI version and FreeBSD or Ubuntu setup is different.
 
Anyway I introduced a two more form actions, tested and reckon the easiest is to use CodeIgniter's built in form class. (don't forget to load the libraries).

Code:
// Test 1
   <?php echo form_open('joke/test_form'); ?>

// Test 2
   <form method="post">

// Test 3
   <form method="post" action="joke/test_form">

//Test 4
   <form method="post" action="/joke/test_form">