Creating a form in Codeigniter

<?php echo form_open(current_url(), ['method' => 'post']);?>
      <div class="form-group has-feedback">
		<?php echo form_input(['name' => 'username', 'type' => 'email', 'class' => 'form-control', 'placeholder' => 'Enter email', 'value' => set_value('username')]);?>
        <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
		<?php echo form_error('username');?>
      </div>
      <div class="form-group has-feedback">
		<?php echo form_password(['name' => 'password', 'class' => 'form-control', 'placeholder' => 'Password']);?>
        <span class="glyphicon glyphicon-lock form-control-feedback"></span>
		<?php echo form_error('password');?>
      </div>
      <div class="row">
        <div class="col-xs-8">
          <div class="checkbox icheck">
            <label>
              <input type="checkbox"> Remember Me
            </label>
          </div>
        </div>
        <!-- /.col -->
        <div class="col-xs-4">
		<?php echo form_submit(['name' => 'submit','value' =>'Sign In', 'class' => 'btn btn-primary btn-block btn-flat']); ?>
        </div>
        <!-- /.col -->
      </div>
    <?php echo form_close();?>

Leave a Reply

Your email address will not be published. Required fields are marked *.

*
*
You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>