Page 1 of 1

Load data from database to textbox

Posted: Wed Jun 25, 2008 10:33 pm
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!

Re: Load data from database to textbox

Posted: Wed Jun 25, 2008 10:43 pm
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!

Re: Load data from database to textbox

Posted: Thu Jun 26, 2008 12:22 am
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?