tommy2shoes Posted March 14, 2011 Share Posted March 14, 2011 Hi I use Dreamweaver to do a lot of my work on a php/mysql database. I have two tables - applications and contacts and they are linked by the id appid. When I view a page with all of the application and contact details the url contains the appid as a number at the end (eg .../Summary.php?appid=639) When I want to edit one of the contacts I go to the edit page but this is identified by a contact id so that url looks like: ../EditContact.php?contactid=32 When I update the contact's details I would like to return to the summary page but can't as the url gets muddled between the two different ids so I end up at a page with no info on it. How can I get round this? I'm sorry my explanation isn't very clear but any help is much appreciated. Quote Link to comment Share on other sites More sharing options...
aabid Posted March 14, 2011 Share Posted March 14, 2011 You can use PHP header function to redirect automatically to the page you will give as an argument. Make sure you don't output anything before header function otherwise it will give error. for example:- $contact_detail = $data_to_be_changed; header(Location: ROOT_DIR/summary.php?appid=123); 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.