Welcome Guest, Not a member yet? Register   Sign In
form submit PROBLEM ! PLEASE HELP
#3

[eluser]Cosmic[/eluser]
OK, thanks for being patient

code is like this

contact_view.php


Code:
// above code is not posted, because I think that is not important


//below is my test $_POST code

                  &lt;?php if(isset($name))echo 'name='. $name.'<br>';?&gt;
                  &lt;?php if(isset($email))echo 'e-mail='. $email.'<br>';?&gt;
                  &lt;?php if(isset($subject))echo 'subject='. $subject.'<br>';?&gt;


//end of test



//below is my form
&lt;?php echo form_open("/contact"); ?&gt;
                            <p>
                                <label>Name</label>
                                &lt;input type="text" name="name" id="name" /&gt;
                            </p>
                            <p>
                                <label for="e-mail">E-mail</label>
                                &lt;input type="text" name="email" id="e-mail" /&gt;
                            </p>
                            <p>
                                <label for="subject">Subject</label>
                                &lt;input type="text" name="subject" id="subject" /&gt;
                            </p>
                            <p>
                                <label for="message">Message</label>
                                &lt;textarea type="text" name="message" id="message" &gt;&lt;/textarea>
                            </p>

                            <p>
                               &lt;?php echo form_submit(array('value'=>'Send','name'=>'submit', 'id'=>'submitButton')); ?&gt;
                            </p>
                        &lt;?php echo form_close(); ?&gt;

.. and this is my contact.php - controller


Code:
// this is whole contact.php controller

&lt;?php
    class Contact extends CI_Controller {
        
        function __construct()
        {
//             Call the Controller constructor
            parent::__construct();
    //        $this->load->database();
    //        $this->load->model('path_mod');
    //        $this->load->model('services_mod');
    //        $this->load->model('head_mod');
            
            $this->load->helper(array('form', 'url'));
     //       $this->load->library('form_validation');
     //       $this->load->library('email');
        }
        
        function index()
        {
    //        $data_head['head'] = $this->head_mod->get_metadata_contact();
   //         $data_head['title'] = $this->head_mod->get_contact_title();
   //         $data_view['path'] = $this->path_mod->load_menus_path();
   //         $data_header_footer['menu'] = $this->path_mod->load_menus_path();
        
  
                $data_view['name'] = $this->input->post('name');
                $data_view['email'] = $this->input->post('email');
                $data_view['subject'] = $this->input->post('subject');
            
                        

//           $this->load->view('headinclude',$data_head);
//           $this->load->view('header',$data_header_footer);
            $this->load->view('contact_view',$data_view);
  //          $this->load->view('footer',$data_header_footer);
        }
    
    
    }

?&gt;


... I made this as simple as I can, I just what to remind you that when I upload this code to internet server is working normal like it should be


Thanks!


Messages In This Thread
form submit PROBLEM ! PLEASE HELP - by El Forum - 04-19-2011, 02:58 PM
form submit PROBLEM ! PLEASE HELP - by El Forum - 04-19-2011, 03:00 PM
form submit PROBLEM ! PLEASE HELP - by El Forum - 04-19-2011, 03:32 PM
form submit PROBLEM ! PLEASE HELP - by El Forum - 04-19-2011, 06:37 PM
form submit PROBLEM ! PLEASE HELP - by El Forum - 04-19-2011, 07:04 PM
form submit PROBLEM ! PLEASE HELP - by El Forum - 04-20-2011, 12:53 AM
form submit PROBLEM ! PLEASE HELP - by El Forum - 04-20-2011, 02:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB