Load data from database to textbox

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
Iokina
Forum Newbie
Posts: 4
Joined: Wed Jun 25, 2008 9:01 pm

Load data from database to textbox

Post by Iokina »

So I know I already have another question out there, but I figured there were other things I could do as I waited for an answer.

Here's what I need -

I have a form to create articles and a list of articles created on the same website. I would like to be able to click on an article in the list and of all of it's data appear in the form for modification

I know how to load data into forms, just not how to do it onclick or how to overwrite the database with the new data.

This isn't troubleshooting, I just need tips for getting started. Still, if you need anything - lemme know!

Thanks so much!
WebbieDave
Forum Contributor
Posts: 213
Joined: Sun Jul 15, 2007 7:07 am

Re: Load data from database to textbox

Post by WebbieDave »

You will definitely want to peruse the numerous tutorials on the web that already explain how to perform these basic tasks with PHP/MySQL. It would be superfluous to repeat such info here. However, the basics are a listing page and an editing page. The listing page would have <a href="editarticle.php?artice_id=<?=$article_id?><?=$article_title?></a>. Then the editarticle page will query the database with article_id and display/load the form from . Best of luck!
Iokina
Forum Newbie
Posts: 4
Joined: Wed Jun 25, 2008 9:01 pm

Re: Load data from database to textbox

Post by Iokina »

See, that is the part that I know how to do quite well

but I want the list and the textbox to be on the same page.

That is the trick. I'm thinking I might need some javascript, though. Is that what I need?
Post Reply