添加echo删除textareas

时间:2012-04-23 12:47:46

标签: php

添加我的echo语句时,textarea框消失了。这是代码的选择:

<?php
$rs_settings = mysql_query("select * from thesis where id='$_SESSION[user_id]'");


        ?>

 <br><?php  while ($row_settings = mysql_fetch_array($rs_settings)) {?>
  <form action="thesis.php" method="post" name="regForm" id="regForm" >
    <div class="forms">

           Title of Proposed Thesis<span class="required">*</span>
      <textarea name="thesis_name" type="text" id="thesis_name" size="600"><?php echo
 $row_settings['thesis_Name']; ?></textarea>

            Abstract<span class="required">*</span>
          <textarea name="abstract" type="text" id="abstract" size="600"><?php echo 
$row_settings['abstract']; ?></textarea> 



      <?php } ?>

有谁知道哪一段代码会引起注意?

1 个答案:

答案 0 :(得分:2)

您的语法不正确。 <textarea>没有value属性。您应该将值放在开始和结束<textarea>标记之间。

 <textarea name="abstract" type="text" id="abstract" size="600"><?php echo $row_settings['abstract']; ?></textarea>