user1296762
user1296762

Reputation: 512

adding echo deletes textareas

When adding my echo statements, the textarea boxes dissapear. This is the selection of code:

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

Does anyone know which piece of code is cauisng this?

Upvotes: 0

Views: 48

Answers (1)

John Conde
John Conde

Reputation: 219794

Your syntax is incorrect. <textarea> doesn't have a value attribute. You are supposed to place the value between an opening and closing <textarea> tags.

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

Upvotes: 2

Related Questions