所以我有问题,Firefox 没有显示我输入的查询的搜索表单结果,但代码在 Opera、Chrome、IE 和 Android 默认浏览器中正常工作。
这是搜索表格:
<div id="menu_right">
<div id="searchBar">
<form id='search_form' method='POST' action='index.php?menu=search'>
<input id="topSearchText" class="inputText" type="text" name="movie" size="30" onfocus="this.value=''" value="Search" style="color: rgb(119, 119, 119);"/>
<input type="image" name="search_movies" value="Search" src="./images/search.png"/>
</form>
</div>
这是代码的php部分:
<table width='100%' cellspacing='0' cellpadding='0' border='0'>
<tbody>
<tr>
<td class='normal_header' colspan='2'>Search Results</td>
<td class='normal_header' width='40' align='center' nowrap=''>Score</td>
</tr>
<?php
if(isset($_POST['search_movies']))
{
$movie=$tmdb->searchMovie($_POST['movie']);
foreach ($movie['results'] as $value) {
$filepath = $value['poster_path'];
$image_url = $tmdb->getImageUrl($filepath, TMDb::IMAGE_POSTER, 'w92');
echo "
<tr>
<td class='borderClass bgColor' width='50' valign='top'>
<div class='picSurround'>
<a href='http://www.themoviedb.org/movie/{$value['id']}'>
<img border='0' src='{$image_url}'>
</a>
</div>
</td>
<td class='borderClass bgColor' valign='top'>
<a href='http://www.themoviedb.org/movie/{$value['id']} '>
<strong>{$value['title']}</strong>
</a>
<a class='button_add' title='Quick add movie to my list' href='addmovie.php?id={$value['id']}'>add</a>
<div class='spaceit'>
<a href='http://www.themoviedb.org/movie/{$value['id']}'>Read more about: {$value['title']}</a>
</div>
</td>
<td class='borderClass bgColor' align='center'>{$value['vote_average']}</td>
</tr>";
}
}
?>
</tbody>
是我的查询有问题还是某些标签有问题,因为我似乎找不到问题。