0
votes

i cannot use iframe in codeigniter. My have tried following /My controller things.php

function index() { $this->load->view('view_index'); }

In view view_index.php there r 4 frame header, main, left & footer. My view_login.php will be loaded in main frame which actually loads my function login()

1
One should note that old-style frames are pretty much antiqued. You should probably look into articles / tutorials that talk about theming / master views first to be able to set up the core of your page. - Aren

1 Answers

1
votes

To send data to different parts of a page the use of templates is advised, at least by myself.

For instance, a template page file look like this

$this->load->view('tops/home1'); //header
$this->load->view($content);//main content(your login area)
$this->load->view('bottoms/main_home'); //footer

From the controller

$data['content'] = 'home/home_content'; //this is the **main** part of your page
$this->load->view('template1', $data); 

To include your login script, simply put the login file in the root(in a directory made by you) and include it as a normal php include wherever you want it to be. As Aren noted, the use of Iframes is ancient and should be avoided