Welcome Guest, Not a member yet? Register   Sign In
HMVC Codeigniter Email Error
#1

[eluser]razerone[/eluser]
Hi I have HMVC installed I have created a folder in applications called modules and inside that is another folder called contact.

In side the contact folder is three other folders called
controllers
model
views

controllers > contact.php
views > contact.php

I am having a problem because when I echo out base in form action and refresh page it blank.

Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Contact extends MX_Controller {

function index()
{
  $this->load->view('header');
  $this->load->view('contact');
  $this->load->view('footer');
}

function sendmail() {
  $this->load->library('email');

  $this->email->from('[email protected]', Your Name');
  $this->email->to(''[email protected]');

  $this->email->subject('Email Test');
  $this->email->message('Testing the email class.');

  $this->email->send();

  echo $this->email->print_debugger();
}
}

views > contact.php

Code:
<form method="post" acti echo base_url('sendmail');?>" id="footer-contact" accept-charset="UTF-8" role="form">
<div class="form-group">
&lt;input type="text" class="form-control" name="name" placeholder="Enter Name"&gt;
</div>
<div class="form-group">
&lt;input type="text" class="form-control" name="email" placeholder="Enter Email"&gt;
</div>
<div class="form-group">
<select  class="form-control" id="subject" name="subject">
<option value="na" selected="">Choose One:</option>
<option value="service">Feedback</option>
<option value="suggestions">Suggestion</option>
<option value="support">Question</option>
<option value="other">Other</option>
</select>
</div>
<div class="form-group">
&lt;textarea type="text" class="form-control" rows="4" placeholder="Message" name="message"&gt;&lt;/textarea>
</div>
<div id="success"> </div> &lt;!-- For success/fail messages --&gt;
<div class="pager">
<button type="submit" class="btn btn-primary">Send</button>
<button type="reset" class="btn btn-danger">Reset</button>
</div>
&lt;/form&gt;

the page link when i type it in is http://www.domain.com/contact

I have set the htaccess so to not have to enter .php




Theme © iAndrew 2016 - Forum software by © MyBB