Welcome Guest, Not a member yet? Register   Sign In
No $_POST data
#21

[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?
#22

[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.
#23

[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.
 
 
 
#24

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

[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).
#26

[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.
 
 
 
#27

[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() ?>
 
 
#28

[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); }
#29

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

[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">
 
 




Theme © iAndrew 2016 - Forum software by © MyBB