我目前有这个代码在页面/ div当你加载它没有任何在url栏(又名只是index.php)我将如何在一个页面加载一些PHP代码代替其他php代码
<?php echo"<h1>For all of your Citation needs!</h1>
<div >
<p>
This page is for any citations you would need to make for reports or essays. Once you enter in the needed information for your sourse, it will spit out the citations in <a href='http://owl.english.purdue.edu/owl/resource/747/01/'>MLA</a> & <a href='http://owl.english.purdue.edu/owl/resource/560/01/'>APA</a> format.</p>
<p >In development is a system where your citations are stored in a database and everytime you make a new one, you will be given related reference material to help your research. Also available soon will be the ability to look up references using related fields such as:</p>
<ul>
<li>Authors</li>
<li>Ttile of Work</li>
<li>Publishing Company</li>
<li>Journal Publisher</li>
<li>Academic Source</li>
<li>Something else will go here</li>
</ul>
</div>"; ?>
当我点击网站上的链接来加载不同形式的数据(的index.php?形式=书),我想在该分区表单数据发生的东西了...对例如:
<?php
switch ($_GET['form'])
{
case 'book':
?>
<form method="POST" action="thispage.php">
<input name="" type="text" value="fghfghfghfghfghfh" />
</form>
<?
break;
case 'b': // show form b
?>
<form method="POST" action="thispage.php">
<!-- form b elements here :) -->
</form>
<?
break;
case 'c': // show form c
?>
<form method="POST" action="thispage.php">
<!-- form c elements here :) -->
</form>
<?
break;
}
?>
是当你点击链接加载表单数据时,在页面/ div中有没有^ TH^^代码块代替另一个php代码块?
另外,如果你”只是学习PHP,这是一个伟大的作者一本体面的书:http://www.amazon.com/PHP-Web-Visual-QuickStart-Guide/dp/0321733452/ –