0

Im new to php and its developing. i'm using codeigniter. header tag is the only tag display there .latter part of script isn't avaliable in view page. my login_view.php code

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
        <title> Login page </title>
</head>


<body>

<div id="container">
    <h1>Login</h1>
        <?php

        echo form_open();

        echo "<p> Email :";
        echo form_input('email');
        echo "</p>";

        echo "<p> password :";
        echo form_input('password');
        echo "</p>";

        echo "<p>";
        echo form_submit('login_submit','login');
        echo "</p>";

        echo form_close();
    ?>    

   </div>       

</body>
</html>

and its page source

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
        <title> Login page </title>
</head>


<body>

<div id="container">
    <h1>Login</h1>

login.php -controller

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

class Login extends CI_Controller {


    public function index()
    {
        $this->load->view('login_view');
    }
}
7
  • did you mean codeigniter? Commented Nov 12, 2014 at 3:50
  • @itachi yes dude it is Commented Nov 12, 2014 at 3:53
  • Turn on your error reporting (ini_set('display_errors', 1); error_reporting(E_ALL);). After that, let us know if anything else shows up.. Commented Nov 12, 2014 at 3:57
  • post your controller. Commented Nov 12, 2014 at 4:00
  • @itachi i have posted controller. but it is nothing just call to view Commented Nov 12, 2014 at 4:04

2 Answers 2

2

You need to load form helper using $this->load->helper('form'); in controller or config file for showing it. At first, check it and if still you face any problem, then post your controller.

Sign up to request clarification or add additional context in comments.

Comments

0

as far as my CI memory goes back, you have to do like this.

class Login extends CI_Controller {


    public function index()
    {
        $this->load->helper('form'); //<----------- this
        $this->load->view('login_view');
    }
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.