0
<textarea name="primary_goals[]" rows="5" cols="23" style="height:145px; width:325px;"><?php echo $primary_goals; ?></textarea>

textarea value is stored in database
primary_goals[] array stores the values enterd in textarea..
how can i display this value again in this text area

Edited by diafol: fixed code tags

5
Contributors
5
Replies
6
Views
5 Years
Discussion Span
Last Post by diafol
0

Before echoing $primary_goals to the text box, retrieve it from your database. How you do it depends generally on which database you are using. It might be worth looking for a tutorial on how to read values from a database. If you are using MySQL for example, search for SELECT statements. Try studying at example #2 here:
http://php.net/manual/en/function.mysql-query.php

0

textarea value is stored in database
primary_goals[] array stores the values enterd in textarea..
how can i display this value again in this text area

This doesn't make much sense to me. You only have one textarea, so why have you got an array in the name attribute? You're already placing $primary_goals into the textarea - so what exactly do you need?

0
$row=mysql_fetch_array(mysql_query("select * from table_name"));
....
....
<textarea name="name_of _textarea" rows="5" cols="23" style="height:145px; width:325px;"><?php echo $row['fieldname']; ?></textarea>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.