AnAmericanGunner Posted June 2, 2011 Share Posted June 2, 2011 I have a user profile page and a form to update things, such as their display name and page layout. When I test it, it updates, but I have to refresh the entire page to see the changes. Is there a way I can have the code submit and refresh? I've tried Googling but nothing seems to be working. Link to comment https://forums.phpfreaks.com/topic/238248-forms-to-refresh-pages/ Share on other sites More sharing options...
Drummin Posted June 2, 2011 Share Posted June 2, 2011 Put the form processing on another page (that just takes posted info and updates DB) and use a header to send the back to the page. header("Location:MyPage.php"); Link to comment https://forums.phpfreaks.com/topic/238248-forms-to-refresh-pages/#findComment-1224353 Share on other sites More sharing options...
Fadion Posted June 2, 2011 Share Posted June 2, 2011 Are you displaying data appart from the form and you need the see the changes when the form submits? If so, place the form submit code before the code that displays data. Example: [php code to display some data] [form][/font] Link to comment https://forums.phpfreaks.com/topic/238248-forms-to-refresh-pages/#findComment-1224355 Share on other sites More sharing options...
AnAmericanGunner Posted June 2, 2011 Author Share Posted June 2, 2011 It wasn't working before, but I tried it again and it still wasn't working. Then I moved it around some other codes at the top and now it's working? Sometimes I ask and then I figure it out, >.< Thanks though! Link to comment https://forums.phpfreaks.com/topic/238248-forms-to-refresh-pages/#findComment-1224357 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.