Hi all,
I have a web page that I use to create records in a database table. The web page will allow users to create projects and assign materials to those projects. As such, it has a post form that, when submitted, sends the user to the same page (I want to do this, as the user should be able to add several materials to a project, and the form has a list of the materials already assigned to the project).
When the form is posted (ie: the POST variables are set) I call the relevant STORED PROCEDURES to create the project and/or materials for that project.
Now, what I want to acomplish is that, once the material is added, the list of materials for this projects is refreshed. I thought about doing this by refreshing the page using javascript (I use: "window.location.reload( true );" is there a better way?), but I have 2 problems:
1) The page issues a warning asking for confirmation to reload a POST page.
2) The page-reload goes into a loop, as the POST variables are set and therefore the database insertion and refresh is executed again and again...
I am sure there must be a much simpler/better approach but I am quite new to Php. Any ideas/suggestions? Many thanks,
Javier