Php 检索数据仅显示第一个字母

Php 检索数据仅显示第一个字母,php,mysql,Php,Mysql,我可以从数据库中检索数据,但每个表只显示一个单词。在我的数据库中,类型是varchar,大小为100。这是我的密码 <?php $profile=mysql_query("SELECT * FROM info WHERE category='$_POST[edit_id]'"); if($profile) { $row = mysql_fetch_array($profile); echo $row['description']. "" ; echo " <form na

我可以从数据库中检索数据,但每个表只显示一个单词。在我的数据库中,类型是varchar,大小为100。这是我的密码

 <?php
 $profile=mysql_query("SELECT * FROM info WHERE category='$_POST[edit_id]'");

 if($profile)
 {
$row = mysql_fetch_array($profile);
echo $row['description']. "" ;

echo "
<form name='custform' action='2.7update.php' method='POST'>
    <center>
        <table border=1 class='table_common'>
        <tr><td>
            <h2>Championship</h2>
            <table border=0>

            <td><input type='hidden' name='id' id='id' value=".$row['id']."></td>


            <tr>
            <td>Category</td>
            <td>:</td>
            <td><input type='text' name='category' id='category' value=".$row['category']."></td>
            </tr>

            <tr>
            <td>Description</td>
            <td>:</td>
            <td><input type='text' name='description' id='description' value=".$row['description']."></td>
            </tr>

            <tr>
            <td>Date</td>
            <td>:</td>
            <td><input type='date' name='date' id='date' value=".$row['date']."></td>
            </tr>

            <tr>
            <td>Status</td>
            <td>:</td>
            <td><input type='text' name='status' id='status' value=".$row['status']."></td>
            </tr>


            <tr>
            <td colspan=3 align=center>
            <input type='submit' name='submit' id='submit_update' value='Confirm and submit'>
            <input type='button' name='back' id='back' value='Back' onClick='javascript:document.location.href=&#39;2.5vieweditchampion.php&#39;;'>
            <input type='button' name='Main Menu' id='Mainmenu' value='Main Menu' 

 onClick='javascript:document.location.href=&#39;2.2coachmain.php&#39;;'>
            </td>
            </tr>
            </table>
        </td></tr>
        </table>
    <BR>
</center>
</form>";
 }
 else
 echo "".mysql_error();

 ?>

这是一个HTML错误。处理后,您的输入将如下所示:

<input type='text' name='description' id='description' value=This is a long string>

这只会让那些人失望。您需要报价:

<input type='text' name='description' id='description' value='This is a long string'>

您显然感到困惑,因为您认为“是引号。这结束了串联字符串。您需要更多引号

<td><input type='text' name='description' id='description' value='".$row['description']."'></td>


我没有看到任何会截断您的数据库信息的内容。请告诉我们有关您的数据库的更多信息以及您认为它被截断的原因。您必须更具体一点。预期的行为是什么?var_dump($row)并显示结果。当我打开它时,它只显示“north”一词,而不是“north pole”