如何回显Html文件的所有内容?

时间:2015-06-21 17:38:41

标签: php html zurb-foundation

我试图回应整个HTML代码。我正在使用基础5,如果我尝试在php代码块中创建一个表单变量,则会出现一个错误,指出基础5中使用的类不可用。正如您所看到的,这不是一个完成的代码,所以我现在只是在寻找答案。

这是我的代码:

<?php
session_start();
?>
<!doctype html>
<html class="no-js" lang="en">
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>AskmanProducts</title>
  <link rel="stylesheet" href="css/foundation.css" />
  <script src="js/vendor/modernizr.js"></script>
  <script src="js/signinvaldator.js"></script>
</head>
<body>
  <div class="row" style="margin-top:10%">
    <div align="center"><h2>Log In To Access This Website</h2></div>
       <br />
       <div class="medium-6 medium-centered large-centered large-6 columns">
        <form data-abide>
          <div class="name-field">
          <label for="username">Username</label>
          <input id="username" type="text" required="" name="user"></input>
          <small class="error" data-error-message="">A username is required.</small>
          </div>
          <label for="password">Password</label>
          <input id="password" type="password" required="" name="password"></input>
          <small class="error">A Password is required.</small>

          <br />
          <br />         
          <button type="submit" name="loginbtn">Log In</button>
          <a href="signup.php" class="button">Sign Up</a>
          <a href="forgotpass.php" class="button">Forgot Password?</a>
          <br />

      </form>
     </div>
  </div>

  <?php

    if ($_POST['loginbtn']) {
      $user = $_POST['user'];
      $password = $_POST['password'];
    }
    else
      echo 

  ?>

  <script src="js/vendor/jquery.js"></script>
  <script src="js/foundation.min.js"></script>
  <script>
    $(document).foundation();
  </script>
</body>
</html>

1 个答案:

答案 0 :(得分:0)

将您的html文件重命名为php。示例:index.html - &gt;的index.php