如何使用相同的header.php构建子页面?

时间:2017-12-16 16:25:35

标签: php html html5

我的目标:当我点击注册链接时,它会将我转到signup.php,它会显示该页面!

我正在尝试使用与php相同的登录表单标头构建asub页面,  但是当我开始使用

 <?php
include_once 'header.php';

?>

它起作用了,它让我感动到了subapge!

这是代码:

的index.php

<?php
include_once 'header.php';

?>

<section class="main-container">

<div class="main-warrper">

<h2> signup </h2> 
</div>

 </section>

<?php
include_once 'footer.php';

?>

的header.php

<!DOCTYPE html>
<html>
<head> 
<title> login form </title> 
<link rel="stylesheet" type="text/css" href="style22.css">

</head> 

<body> 

<header>

<nav>

<div class= "main-warrper">  
<ul> 

    <li><a href="index.php">home </a></li>
</ul>
<div class="nav-login"> 
<form> 
<input type = "text" name="uid" placeholder="email"> 
<input type = "password" name="pwd" placeholder="password"> 
 <button type="submit" name="submit"> login </button>   
    </form>
<a href="signup.php">sign up </a> 
</div>

</div>
 </nav> 

</header> 

signup.php

<?php
include_once 'header.php';

?>

<section class="main-container">

<div class="main-warrper">

<h2> signup </h2> 
</div>

 </section>

<?php
include_once 'footer.php';

?>

1 个答案:

答案 0 :(得分:0)

您正试图将屏幕移动到登录位置,在一个页面中注册。

&#13;
&#13;
<header page>
<index page>
<a href=#signup>sign up</a>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br>
<signup page here>
<div id=signup style="color:red;"><input type=text>sing in
</div>
&#13;
&#13;
&#13;

&GT;