simon551 Posted June 25, 2007 Share Posted June 25, 2007 Trying to simplify my data entry workflow a little bit. (too many pages to update) I have a page that submits info through a form. (form 1) The processing script is in another file. (script 1) script 1 sends the user back to form 1 for more entries Then there is a page to review entries (report 1) with a link to edit ---> (form 2) The processing for form 2 is another file (script 2) script 2 sends the user back to report 1 after the submit on form 2 also on form 1 is an a list of entries for this master record. (growing after each submit) on this detail is a link to edit the entry (currently form 3, but what I'm trying to do next will allow me to point it to form 2)... What I would like to do is have the same page for editing but use a little logic of where they got to the edit page from so that the user will be sent back either to the data entry page or the report page depending on which page they started at. NOT to the edit record page which is where the $_POST will be coming from. Quote Link to comment Share on other sites More sharing options...
btherl Posted June 26, 2007 Share Posted June 26, 2007 I notice no-one has replied.. I think they are as baffled as I am by your explanation. Can you give some details about your application? Not that I need to know, but it's hard to understand it in such an abstract form. You can even post your scripts if you want (in code tags). Sometimes programmers find code easier to understand than english Quote Link to comment Share on other sites More sharing options...
simon551 Posted June 26, 2007 Author Share Posted June 26, 2007 hi, yeah. This is an intranet application site. Currently I'm working on an expense report section of the site. The data entry page is for detail records for an expense report. I'm trying to make it a little easier for the users by showing a list of entries as they enter records. Then on that list is a link to edit the record. There is also a report page that is a printable detail of all the entries in the report. Something they can also turn in to accounting with all the receipts. I'm also providing a link on the report for editing records. what I'd like to do is to use the same form for editing whether the user is coming from the data entry page or the report page-- and then direct back -- after submitting the edited record -- to the page they were on. somehow I guess I would like to store a variable, maybe a $_SESSION[referer] type of variable, if that's possible, on the editing page and then pass it to the processing page to write into this part of the processing page: header("Location: ". $er); sorry about all the typos Quote Link to comment Share on other sites More sharing options...
btherl Posted June 26, 2007 Share Posted June 26, 2007 Ok, that makes sense. And sessions sounds like a good solution. Is there any problem with storing the url to return to in $_SESSION and redirecting back? As an alternative to Location, you can use a meta refresh tag with a delay. That lets the user see the results of what they did before getting redirected. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.