Page 1 of 1

Help with an edit form using a textbox needed

Posted: Wed Aug 27, 2008 11:37 am
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.

Re: Help with an edit form using a textbox needed

Posted: Wed Aug 27, 2008 12:02 pm
by mrgooding
I have now realised the textarea doesn't have a value tag. Problem solved!