Grow your CSS skills. Land your dream job.

Show senders details email php help

  • # November 1, 2013 at 1:49 am

    Hi does any one know how to display the senders information on top of the message from website using php codeigniter. At the moment only displays message in the body.

    (Message Body)

    Senders Name: Sample Joe
    Senders Email: joe@demo.com
    Senders Subject: Subject Line
    Senders Message:
    Blah Blah Blah
    
    
    <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
    
    class Contactus extends MX_Controller {
    
        public function index() {
    
            $this->load->view('header');
            $this->load->view('contactus');
            $this->load->view('footer');
    
        }
    
        public function confirmation() {
    
            $this->load->library('form_validation');
    
            $this->form_validation->set_rules('fullname', 'Your Full Name', 'required');
            $this->form_validation->set_rules('email', 'Your Email', 'required|valid_email');
            $this->form_validation->set_rules('subject', 'Your Subject', 'required');
            $this->form_validation->set_rules('message', 'Your Message', 'required');
    
            if ($this->form_validation->run() == FALSE) {
    
                $this->load->view('header');
                $this->load->view('contactus');
                $this->load->view('footer');
    
            } else {
    
                $this->load->library('email');
    
                $this->email->from(set_value('email'), set_value('fullname'));
                $this->email->to('info@demo.com');
                $this->email->subject(set_value('subject'));
                $this->email->message(set_value('message'));
    
                $this->email->send();
    
                //echo $this->email->print_debugger();
    
                $this->load->view('header');
                $this->load->view('contactus');
                $this->load->view('footer');
    
    
            }
    
        }
    }
    
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".