![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Mar 2005
Posts: 16
Rep Power: 0
![]() |
Textarea, PHP & MySQL
okay, strange error, i'm writing a script (some may know this already
) where the user can add/edit/delete articles and category's to the database. Im currently working on the edit part, the others are working...i have a strange error on the edit article part i use this line to assign the text held in the row 'body' in the article table to a textarea in HTML Body: <textarea cols="65" rows="15" name="body" value ="<? echo "$body" ?>"></textarea> In the database the type is of type text. When the textarea appears no text is inside of it, it is completely empty. However, if i change the input type to a text box it shows the text held in the database. Like the following: Title: <input type="text" name="body" value="<? echo "$body"?>"> any ideas? should i change the mysql data type to longtext or blob? havent a clue at the moment |
|
|
|
|
|
#2 |
|
Programming Guru
![]() ![]() |
try:
[PHP] echo "<textarea cols=\"65\" rows=\"15\" name=\"body\">" . $body . "</textarea>"; [/PHP] the values for a textarea goes in between the two textarea tags. That's probably what's wrong.
__________________
Profanity is the one language that all programmers understand. Check out my Blog <---updated Nov 30 2007! |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|