douyao1856 2013-07-17 11:25
浏览 39

Firefox没有显示我的PHP代码的结果

So I have problem with firefox not showing results of search form for query i enter, but code is working normally in Opera,Chrome,IE and Android default browser.

This is the search form :

<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>

and this is the php part of the code:

<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>

Is it something wrong with my query or maybe some tag because I cant seem to find the problem.

  • 写回答

3条回答 默认 最新

  • douxishai8552 2013-07-17 11:30
    关注

    Have you checked the error_log that was possibly created?
    Also.. and I might be wrong here.. but as far as I know php only interprets code between double quotes "", not between single quotes ''.

    So for instance:

    $test = 5;
    echo "this string shows the value of $test"
    echo 'this string just shows the string $test';
    
    评论

报告相同问题?