Welcome Guest, Not a member yet? Register   Sign In
Error Line number 662 library/session.php
#3

[eluser]linderox[/eluser]
Code:
<?php

class Welcome extends Controller {

    function Welcome()
    {
        parent::Controller();    
    }
    

function index(){
  $this->load->helper('form');
  $data['title'] = "Welcome to our Site";
  $data['headline'] = "Welcome!";
  $data['include'] = 'home';
  $this->load->vars($data);
  $this->load->view('header');
  $this->load->view('template');
}

function contactus(){
  $this->load->helper('url');
  $this->load->model('MContacts','',TRUE);
  $this->MContacts->addContact();
  redirect('welcome/thankyou','refresh');
}

function thankyou(){
  $data['title'] = "Thank You!";
  $data['headline'] = "Thanks!";
  $data['include'] = 'thanks';
  $this->load->vars($data);
  $this->load->view('template');
}

function contact(){
  $this->load->helper('url');
  if ($this->input->post('email')){
    $this->load->model('MContacts','',TRUE);
    $this->MContacts->addContact();
    redirect('welcome/thankyou','refresh');
  }else{
    redirect('welcome/index','refresh');
  }
}

}
?>

header.php view
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">&lt;html &gt;

&lt;head&gt;
&lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"/&gt;
&lt;meta name="description" content="description"/&gt;
&lt;meta name="keywords" content="keywords"/&gt; &lt;link rel="stylesheet" type="text/css" href="&lt;?=base_url()?&gt;public/css/style.css" media="screen"/&gt;
&lt;title&gt;День Рождения Алины Шиповой!!!&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;

<div class="outer-container">
<div class="header">
<h1></h1>
</div>

template.php view
Code:
<p>This is random text for the CodeIgniter article.
There's nothing to see here folks, just move along!</p>
<h2>Contact Us</h2>

&lt;?php
echo form_open('welcome/contactus');
echo form_label('your name','name');
$ndata = array('name' => 'name', 'id' => 'id', 'size' => '25');
echo form_input($ndata);

echo form_label('your email','email');
$edata = array('name' => 'email', 'id' => 'email', 'size' => '25');
echo form_input($edata);

echo form_label('how can you help you?','text');
$cdata = array('name' => 'text', 'id' => 'text', 'cols' => '40', 'rows' => '5');
echo form_textarea($cdata);

echo form_submit('submit','send us a note');
echo form_close();

?&gt;


Messages In This Thread
Error Line number 662 library/session.php - by El Forum - 02-26-2009, 12:29 AM
Error Line number 662 library/session.php - by El Forum - 02-26-2009, 02:31 AM
Error Line number 662 library/session.php - by El Forum - 02-26-2009, 02:54 AM
Error Line number 662 library/session.php - by El Forum - 02-26-2009, 03:04 AM
Error Line number 662 library/session.php - by El Forum - 02-26-2009, 03:31 AM
Error Line number 662 library/session.php - by El Forum - 02-26-2009, 04:55 AM
Error Line number 662 library/session.php - by El Forum - 11-29-2012, 01:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB