[eluser]dennismonsewicz[/eluser]
I am writing a contact form (complete NEWB FYI to codeigniter) but here is my code:
The Controller
Code:
function contact()
{
if ($this->validation->run() == FALSE)
{
$this->data['formPage'] = $this->load->view('form');
}
else
{
$this->data['formPage'] = $this->load->view('formsuccess');
}
$this->load->view('contact', $this->data);
}
The View
Code:
<?php $this->load->view('header'); ?>
<div class="container">
<div class="left_weight_two">
<?php $this->load->view('nav'); ?>
<div class="content-left">
<?php echo $formPage; ?>
<div style="clear:both;"></div>
</div>
</div>
<?php $this->load->view('right'); ?>
<div style="clear:both;"></div>
</div>
<?php $this->load->view('footer'); ?>
For some reason the form is displaying above the header and rendering before the rest of the site. Any suggestions?