Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Editing Records

New Here ,
Aug 21, 2007 Aug 21, 2007

Copy link to clipboard

Copied

Hi there,

I am trying to update records in a mysql database using dreamweaver server behaviours. The server set up is Apache/MySQL/PHP.

I have two tables in the database: 1 for articles and 1 for school. The relationship is 1 school may have 0,1 or more articles. I have successfull created a the form to add new articles to the database. In the form, I have the fields for the user to input the article specifics and have a dynamic list/menu for the user to selelct the school before adding the article. This has worked fine as I have created an articleContent.php which has displays the article.

However, what I am trying to achieve in terms of editing the articles, is instead of having a list of all the schools on an page with links down the side saying "edit" next to it, which take you to a edit.php page with a list of all the articles associated with that particluar school, I want to have a form with a dynamic list/menu called edit1.php. This form would be accessed from the main admin.php and would allow the user to select the school from the list, click submit, then this would get posted to a page with all the articles of the particular school selected.

I have tried to do this but I am having problems. I have started creating the edit1.php page and put a form with the dynamic list/menu and the submit button. I have given the list/menu the name of schoolID which is the primary key of the school table in the database. I am stuck at this point and looking for some help in how I progress with this.

Any further help would be greatly appreciated.

Regards
dmlocke
TOPICS
Server side applications

Views

330
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 21, 2007 Aug 21, 2007

Copy link to clipboard

Copied

orange22 wrote:
> I have given the list/menu the name of schoolID which is the
primary key of
> the school table in the database. I am stuck at this point and looking for
> some help in how I progress with this.

If the schoolID is set as the value attribute of the <option> tags in
the drop-down menu, it will be contained in the $_POST array when the
submit button is clicked. In the Recordset dialog box for the page that
displays the list of articles, set Filter to schoolID = Form parameter
schoolID.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 21, 2007 Aug 21, 2007

Copy link to clipboard

Copied

LATEST
Hi David,

I have tried this solution and it works fine. I appreciate your help.

Thank you very much.
dmlocke

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines