icky_thump — 2013-11-25T15:20:23-05:00 — #1
I have a form on my site for user registration.
When that is filled in and returned, there is a copy of it in the Admin panel of the CMS (custom built).
I'm wanting to add a field for NOTES, only on the admin side.
I've added it in and
if I use the INPUT tag, I can type in, it gets stored in the database and if I save and leave that admin page, when I come back, the NOTES are there.
That is what I want.
But, I want a bigger box, more space so as to more readily see what is typed into the notes.
So, I'm switching from INPUT to TEXTAREA.
When I use TEXTAREA, I type it in, it's stored in the database, but when I save and leave the page, then come back, the notes are empty, it does not pull those notes back in from the database.
I can't figure out what I'm missing.
icky_thump — 2013-11-25T17:06:22-05:00 — #2
finally figured it out.
using INPUT, the php call to the database is in the value="" part, and the tag is self closing.
using TEXTAREA, it needs to put in between the opening and closing TEXTAREA tags to bring in back in from the database.
stomme_poes — 2013-11-27T06:08:52-05:00 — #3
Though I've also seen php code using get/post where the "name" attribute of the textarea worked fine.
<textarea name="foo" id="bar" rows="" cols="">MAH TEXT YO</textarea>
$thetext = $get/post['foo']
$thetext is now MAH TEXT YO