Jump to content

Archived

This topic is now archived and is closed to further replies.

munchy

Reading into an editable text field

Recommended Posts

Hello!

I am a teacher building a website to help students with their math work. Right now I am making the communication page where I post homework, test dates and the like. These are MYSQL database fields that I am trying to update using a web form so I do not have to go into phpmysqladmin and update each field by hand. I am hitting a brick wall with the script. I can make a form that updates these fields, but some fields I just want to stay as is. Is it possible to make some code to read the already-existing comments into an editable text field, so that I can make changes to the ones I need to change and then submit the form? All I would need help with is the part that reads the text into the text field, I can handle everything else (I'm pretty sure...)

Thanks,
Munchy

Share this post


Link to post
Share on other sites
[code=php:0]
// connect and query your database.
// returning an array of records called $row.
echo "<form>";
echo "<textarea name=\"edit\">{$row['fieldtoedit']}</textarea>";
echo "</form>";
[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.