Help with an edit form using a textbox needed

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mrgooding
Forum Newbie
Posts: 23
Joined: Thu May 22, 2008 11:45 am

Help with an edit form using a textbox needed

Post by mrgooding »

Hi All

I'm having a bit of trouble allowing users to edit certain fields within my webpage - the ones affected are only ones that use a textbox for some reason - the field within the database isn't shown for editing.

Code: Select all

echo "<input type='text' name='groupname' size='25' value=".$editrow['g_name']."></td>";
Works fine (i.e. the user can see the field g_name and edit accordingly), whereas:

Code: Select all

echo "<td colspan='2'><textarea name='groupnotes' value=".$editrow['g_description']."></textarea></td>";
Doesn't show the current records g_description (i.e. is blank regardless of the previous value).

Funnily enough, when I enter something into this textarea, it IS updated in the database.

I have the same issue on a different edit page also. Any ideas why this could be?

Any help would be greatfully received.
mrgooding
Forum Newbie
Posts: 23
Joined: Thu May 22, 2008 11:45 am

Re: Help with an edit form using a textbox needed

Post by mrgooding »

I have now realised the textarea doesn't have a value tag. Problem solved!
Post Reply