Question
Editing Records
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
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
