-2

Really don't know whats up here but it's not returning anything on the page.. I am slowly changing everything from MySQL to the new MySQLi

<?php
include_once "php_includes/db_conx.php";
$query = "SELECT * FROM testimonials ORDER BY id ASC LIMIT 32";
$result = mysqli_query($query) or die (mysqli_error());
while ($row = mysqli_fetch_array($result)){
   $testtitle = $row['testtitle'];
   $testbody = $row['testbody'];
   $compowner = $row['compowner'];
   $ownertitle = $row['ownertitle'];
   $compname = $row['compname'];
   $compwebsite = $row['compwebsite'];

   $testsList .= '<div class="gekko_testimonial testimonial gekko_testimonial_speech">  
       <div class="gekko_main"><div class="gekko_headline">' . $testtitle . '</div>
        <p>' . $testbody . '</p>
        </div>
         <div class="speech_arrow"></div>   
         <span class="gekko_who_client_name">' . $compowner . ' of ' . $compname . '</span>
         <span class="gekko_who_job_title">' . $ownertitle . '</span>
         <span class="gekko_who_website">View the Website... <a href="http://' . $compwebsite . '" target="_blank">' . $compwebsite . '</a></span>
      </div>';
 }
?>

Any help greatly appreciated! I am also you <?php echo $testslists; ?> in my html! Many thanks Phillip Dews

4

2 に答える 2

2

あなたの唯一の問題は不十分なエラー報告です

error_reporting(E_ALL);
ini_set('display_errors',1);

これらの行をコードの先頭に追加するだけで、コードの正確な問題がすぐに通知されます。

本番サーバーでは、エラーの表示をオフにしてログオンする必要があることに注意してください

于 2013-07-31T11:01:39.197 に答える