无法在codeigniter form_open()中显示2表单

时间:2016-04-30 20:15:40

标签: php html css forms codeigniter

我在Codeigniter项目中面临一些小问题。当我按顺序添加2个表格时。它只显示第一种形式而不是两种形式。任何人都可以告诉我错误/错误。我在哪里做错了。请指导我。

<div class="form">

  <ul class="tab-group">
    <li class="tab active"><a href="#signup">Sign Up</a>
    </li>
    <li class="tab"><a href="#login">Log In</a>
    </li>
  </ul>

  <div class="tab-content">
    <div id="signup">
      <h1>Sign Up for Free</h1>

      <?php $attributes=a rray( 'id'=>'signup-form','name' => 'signup-form'); echo form_open('login/signups', $attributes);?>
      <div class="top-row">
        <div class="field-wrap">
          <label>
            First Name<span class="req">*</span>
          </label>
          <?php $data=a rray( 'type'=>'text', 'id' => 'us_fname', 'name' => 'us_fname', 'autocomplete' => 'off', 'required' ); echo form_input($data); ?>


        </div>

        <div class="field-wrap">
          <label>
            Last Name<span class="req">*</span>
          </label>
          <?php $data=a rray( 'type'=>'text', 'id' => 'us_lname', 'name' => 'us_lname', 'autocomplete' => 'off', 'required' ); echo form_input($data); ?>
        </div>
      </div>

      <div class="field-wrap">
        <label>
          Email Address<span class="req">*</span>
        </label>
        <?php $data=a rray( 'type'=>'email', 'id' => 'us_email', 'name' => 'us_email', 'autocomplete' => 'off', 'required' ); echo form_input($data); ?>
      </div>

      <div class="field-wrap">
        <label>
          Set A Password<span class="req">*</span>
        </label>

        <?php $data=a rray( 'type'=>'password', 'id' => 'us_pass', 'name' => 'us_pass', 'autocomplete' => 'off', 'required' ); echo form_password($data); ?>
      </div>

      <?php $data=a rray( 'class'=>'button button-block', 'id' => 'us_signup', 'name' => 'us_signup' ); echo form_submit($data); form_close();?>

    </div>

    <div id="login">
      <h1>Welcome Back!</h1>

      <?php $attributess=a rray( 'id'=>'login-form','name' => 'login-form'); echo form_open('login/login_data', $attributess);?>
      <div class="field-wrap">
        <label>
          Email Address<span class="req">*</span>
        </label>
        <?php $data1=a rray( 'type'=>'email', 'id' => 'u_email', 'name' => 'u_email', 'autocomplete' => 'off', 'required' ); echo form_input($data1); ?>
      </div>

      <div class="field-wrap">
        <label>
          Password<span class="req">*</span>
        </label>
        <?php $data1=a rray( 'type'=>'password', 'id' => 'u_pass', 'name' => 'u_pass', 'autocomplete' => 'off', 'required' ); echo form_password($data1); ?>
      </div>

      <p class="forgot"><a href="#">Forgot Password?</a>
      </p>

      <?php $data1=a rray( 'class'=>'button button-block', 'id' => 'login', 'name' => 'login' ); echo form_submit($data1); form_close();?>

    </div>

  </div>
  <!-- tab-content -->

</div>
<!-- /form -->

enter image description here

0 个答案:

没有答案