On my form, I have an echo which links to the data in my database.
However, If it is the first time the form has been visited (no ID in the table relating to the session) the textboxes do not appear whereas they should appear but empty!
It is successful when the id links to the session and there is a row in the database (the user has already completed the form once and has come back to edit.)
I hope this makes sense. To try and be clearer, if the user is visiting the form for the first time the textareas should be there (they disappear at the moment) but be empty.
$rs_settings = mysql_query("SELECT * from thesis WHERE user_id = $user_id;");
<br>
<form action="thesis.php" method="post" name="regForm" id="regForm" >
<?php while ($row_settings = mysql_fetch_array($rs_settings)) {?>
Title of Proposed Thesis<span class="required">*</span>
<textarea name="thesis_Name" type="text" style="width:500px; height:150px"
id="thesis_Name" size="600"><?php echo $row_settings['thesis_Name']; ?>
</textarea>
Use mysql_num_rows()
Did you mean someting like this