//错误:信息被附加但没有被替换。
<form action="testme.php" method="get">
<p>
<input name="search" type="text" value="">
<input type="submit" name="button" id="button" value="Submit">
</p>
<h3>Filter Results</h3>
<p><a href="testme.php?filter='Action'<?php if (isset($_GET['search']) && !empty($_GET['search'])) {echo '&search='.$_GET['search'];}
?>">Action</a></p>
<p><a href="testme.php?filter='Comedy'<?php if (isset($_GET['search']) && !empty($_GET['search'])) {echo '&search='.$_GET['search'];}
?>">Comedy</a></p>
</form>
<?php
if (isset($_GET['button']) && isset($_GET['search']) != '') {
echo $_GET['search'];
}
elseif (isset($_GET['filter']) == "Action" && isset($_GET['search']) != '') {
echo "Action " . $_GET['search'];
}
elseif (isset($_GET['filter']) == "Action" && isset($_GET['search']) == '') {
echo " No action Involved ";
}
if (isset($_GET['filter']) == "Comedy" && isset($_GET['search']) == '') {
echo " No Comedy Involved";
}
//当我点击任何一个链接时,我得到:不涉及任何动作不涉及喜剧。但我只想展示一个?>