Retrieving from Database - Some text missing!!

Codes here !

Moderators: macek, egami, gesf

aragorn911
New php-forum User
New php-forum User
Posts: 4
Joined: Wed May 16, 2012 9:01 am

Retrieving from Database - Some text missing!!

Postby aragorn911 » Thu May 17, 2012 5:17 am

Hello,
I'm retrieving some data from my database and displaying in my page. But when I get them,
Some text from the text is missing. For example, if I have a text in my database saying
"HELLO HELLO MY NAME IS ARAGORN,
IM POSTING IN A FORUM"

It might display as,
"HELLO HELLO M
IM POSTING IN A FORUM"

Here's my code..

Code: Select all

     
        <?php
      
       if(isset($_POST['search'])){
         $Language = $_POST['Language'];
         $criteria = $_POST['criteria'];
         
       $query = "SELECT * FROM songs WHERE Title LIKE '$criteria%' AND Language = '$Language' ";
         $result = mysql_query($query) or die ("ERROR");

      while($row = mysql_fetch_array($result)){
         
        echo "<br/><br/>";
        echo "<b><h1>";       
          echo $row['Title'];
         echo "</b></h1>";       
        echo "<br/><br/>";
         
        if($Language == 'Sinhala'){
        echo "<span class=sinhala>";
       
          }
        echo nl2br ($row ['Lyrics']);
        echo "</span>";
          echo "<br/><br/>";
        echo "<br/><br/>";
          }     
        echo "<br/><br/>";
       }
      
      ?>



The Lyrics cell is of type TEXT...

Return to “mySQL & php coding”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests