Hi there i am using a form submission but i want that i want to display contact page even after submission of the form. I dont want to view error or success page
this is my controller:
public function validate()
    {
        $name    = $this->input->post("name");
        $email   =$this->input->post("email");
        $captcha   =$this->input->post("captcha");
        $message =$this->input->post("message");
        $captcha_code     =$this->session->userdata("captcha_code");
        if($captcha == $captcha_code){
            $this->load->library("PHPMailer_Library");
        $objMail = $this->phpmailer_library->load();
        $mail = new PHPMailer(true);                              
        try {
        $mail->SMTPDebug = 2;                               
        $mail->isSMTP();                                      
        $mail->Host = 'smtp.gmail.com';  
        $mail->SMTPAuth = true;                               
        $mail->Username = 'proxyemu19@gmail.com';                 
        $mail->Password = '****';                           
        $mail->SMTPSecure = 'tls';                            
        $mail->Port = 587;   
        $mail->SMTPOptions = array(
        'ssl' => array(
            'verify_peer' => false,
            'verify_peer_name' => false,
            'allow_self_signed' => true
            )
        );                                 
        $mail->setFrom('proxyemu19@gmail.com');
        $mail->addAddress('cugurel7@gmail.com');     
        $mail->isHTML(true);                                 
        $mail->Subject = 'Ziyaretçi Form Mesajı';
        $mail->Body    ="Ziyaretçi ismi: ". $name."<br>Ziyaretçi mail adresi ".$email."<br> Ziyaretçi e-posta: ".$message;
        $mail->AltBody = strip_tags($message);
        $mail->send();
        echo 'Message has been sent';
        } catch (Exception $e) 
        {
            echo 'Message could not be sent. Mailer Error: ', $mail->ErrorInfo;
        }
        }else{
            echo "Doğrulama kodu yanlıştır";
        }
    }
Can you please help me how can i do this. My contact page yerel/yansayfa/contact. And i want to display this after submission.
Thanks!!!
 
    