Welcome Guest, Not a member yet? Register   Sign In
POST problem
#1

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

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

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

[eluser]ouzodestructo[/eluser]
It is.
#4

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

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

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

[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)
#8

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




Theme © iAndrew 2016 - Forum software by © MyBB