CodeIgniter Forums
POST problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: POST problem (/showthread.php?tid=2924)



POST problem - El Forum - 08-30-2007

[eluser]ouzodestructo[/eluser]
Hi. I have built a site for the first time in Codeigniter and am loving using it. I'have a great working copy on my local and have just put the site on our webservers to test. It all looks great but I am having a problem with any data I post in a form. This means I can't even log in to start to make changes.

At http://c35.servage.net/geneethics.org/contact I've inserted print_r($_POST) in there and even if you enter stuff into the text fields and hit submit, there's nothing there.

Any ideas on what might be causing this?


POST problem - El Forum - 08-30-2007

[eluser]coolfactor[/eluser]
Code:
<?php print_r($_POST); ?>

You need to surround it in <?php and ?> tags.


POST problem - El Forum - 08-30-2007

[eluser]ouzodestructo[/eluser]
It is.


POST problem - El Forum - 08-31-2007

[eluser]bijon[/eluser]
use $this->input->post('fieldname');


POST problem - El Forum - 08-31-2007

[eluser]ouzodestructo[/eluser]
Thanks but that doesn't help any. Like I said, all this works fine on my dev box, so its not really a coding issue. Thought there might be something a bit more fundamental that might be preventing affecting it.


POST problem - El Forum - 08-31-2007

[eluser]johnwbaxter[/eluser]
Have you tried putting that print_r into your controller?


POST problem - El Forum - 08-31-2007

[eluser]andreagam[/eluser]
Ouzodestructo, you got this:
Code:
<form action="http://c35.servage.net/geneethics.org/contact/display" method="post" name="form">
Try to take off the 'name' parameter, like this:
Code:
<form action="http://c35.servage.net/geneethics.org/contact/display" method="post">

It worked for me in a similar situation.

Looking at your HTML, I see a print_r($_POST). Be sure to put it inside of <?php ?> tags (as Coolfactor said)


POST problem - El Forum - 08-31-2007

[eluser]ouzodestructo[/eluser]
I have fixed the problem but it was a problem with my web hosts. This URL is a temp one where I can test the site before going live and thats screwing it up somehow. I managed to test on another server & it worked ok! Yeah!

Thanks all for your help.