simon551 Posted June 26, 2008 Share Posted June 26, 2008 Hi, I'm struggling with this problem. I'm working on an intranet expense reporting application and I have expense items with 2 different expense types (overhead or client-billable) and the same with projects. I use a drop-down box at the top of the page that allows the user to select whether the expense is client billable or overhead and then a submit. The drop-downs for item and project on the page are then filtered for the type selected based on a session variable created on the 'submit' page. This works fine until we come to the process of editing the transaction. What I would like to do is force the drop-downs to default to the type of expense that it was initially (based on the project) and then allow the user to change that if necessary using the same drop-down at the top for 'overhead' or 'client-billable.' The problem I run into is that the code I've written which looks up the type of the original transaction overrides the session variable (by design, because otherwise those drop-downs would appear blank sometimes.) I'm not sure how to beat this logical problem. Problem ER Edit page 1. Item Type Setting defaults to the type that the original entry is 2. User changes setting by submitting to a page that creates a session variable 3. Then directed back and the session variable is over-written by the code at 1 Link to comment https://forums.phpfreaks.com/topic/112100-solved-look-up-based-on-session-variable-and-editing-logic-problem/ Share on other sites More sharing options...
simon551 Posted June 26, 2008 Author Share Posted June 26, 2008 nevermind, I was able to accomplish this by just adding a url variable to the session variable. A bit convoluted but it works for now. cheers. Link to comment https://forums.phpfreaks.com/topic/112100-solved-look-up-based-on-session-variable-and-editing-logic-problem/#findComment-575528 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.