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

[eluser]andriansandi[/eluser]
Hello,

I have a website on dreamhost (this is my first experience using this hosting provider). When i post data from my form it's always get NULL. i have turned codeigniter profiler an see the post data doesnt exist at all. Somebody can help me?

You can reach my form at : http://www.sn2.ejago.com/survey.html



Regards,


sandhee_tube
#2

[eluser]Maglok[/eluser]
I get a 404:

Code:
404 Page Not Found

The page you requested was not found.

Mabye see some code?
#3

[eluser]andriansandi[/eluser]
@Maglok :

Code:
function survey(){
        echo var_dump($_POST);
        //load from database
        $this->data['data_survey'] = $this->m_survey->fnLoad()->result();
        $this->data['sum_survey'] = $this->m_survey->fnCountAll();
        $this->data['header'] = TRUE;
        $this->data['subtitle'] = 'Survey';
        
        
        $this->form_validation->set_rules('name','Name','required');
        $this->form_validation->set_rules('email','E-mail','required|valid_email');
        $this->form_validation->set_rules('comment','Comment','required');
        
        if($this->form_validation->run()){
            $this->tempData['name'] = $this->input->post('name');
            $this->tempData['email'] = $this->input->post('email');
            $this->tempData['website'] = $this->input->post('website');
            $this->tempData['comment'] = $this->input->post('comment');
            
            if($this->m_survey->fnSave($this->tempData)){
                //redirect('survey');
            }
        }
        
        $this->lib_view->load_view('survey',$this->data);
    }

I used .htaccess just like this:
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php)
RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>

PS : You can reach my form now.

Thank's for your help Smile
#4

[eluser]Maglok[/eluser]
What does your form do when validation has NOT run correctly?

Anyhow, you are saying $this->input->post('email') for example is not exsistant? What do you post in the view?

Mabye also try to make a simple form outside of CI and see if it is the host somehow. Or try to host this on non-dreamhost for a few and see if it works.
#5

[eluser]andriansandi[/eluser]
There's nothing do when validation has NOT run correct. But if validation works, it will be inserted to database. I have tried using simple form outside CI and it's work, so i try simple test controller with simple form. And it not work too.

Simple Form outside CI : http://sn2.ejago.com/test.php
Simple Form CI Controller : http://sn2.ejago.com/test




Theme © iAndrew 2016 - Forum software by © MyBB