tomkure Posted February 6, 2010 Share Posted February 6, 2010 Hi, Being a programmer in ERP systems for a decade, PHP is confusing(at least for me) I guess it is a simple task, but not for me...so if you can help I will be greatful 1. I have 3 different pages(1.php, 2.php, 3.php) that go to same detail.php page with dynamic content. 2. If I click 'back' or use javascript.goback(-1) I get an resend window which I want to avoid 3. Therefore I want to record which page I am coming from to direct where to go from my back buttom 4. In my opion I need to use a global variable that can been read in detail.php. I have tried sessions which for me dont work. If you have suggestion how to solve this I will appriciate very much Kind Regards Tom Quote Link to comment https://forums.phpfreaks.com/topic/191134-variable-scope-i-am-sad/ Share on other sites More sharing options...
ignace Posted February 6, 2010 Share Posted February 6, 2010 Hi please post all relevant code as sessions should work because their internals weren't programmed to exclude certain types of programmers. Quote Link to comment https://forums.phpfreaks.com/topic/191134-variable-scope-i-am-sad/#findComment-1007824 Share on other sites More sharing options...
NoSalt Posted March 22, 2010 Share Posted March 22, 2010 I'm not sure if I understand exactly what you want, but I'll give an answer a try. If you are doing something from a form "submit", you should direct the user to some "process.php" page - that does not render any HTML - to do what you want (e.g., db update, etc.) and, depending on the success/failure of the process, direct them to another page using: header("Location: ./{1,2,3}.php"); exit; I don't know if this is what you need but I hope it helps. Quote Link to comment https://forums.phpfreaks.com/topic/191134-variable-scope-i-am-sad/#findComment-1030018 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.