Xanco Posted April 5, 2013 Share Posted April 5, 2013 Hello peoples. I have a div, id=body, which is constantly changing. How can I save what is in the div is a php variable, to use on the next page? - Thanks, Xanco Quote Link to comment https://forums.phpfreaks.com/topic/276596-saving-contents-of-a-div-as-a-php-variable/ Share on other sites More sharing options...
davidannis Posted April 6, 2013 Share Posted April 6, 2013 (edited) One way to do that is to use javascript / jQuery to kick off an Ajax event when the div contents change. I don't have sample code but I posted similar code for a sortable list recently. In my example when the list order changes jQuery sends an Ajax request to the server and a php script updates the database. Edited April 6, 2013 by davidannis Quote Link to comment https://forums.phpfreaks.com/topic/276596-saving-contents-of-a-div-as-a-php-variable/#findComment-1423217 Share on other sites More sharing options...
Jessica Posted April 6, 2013 Share Posted April 6, 2013 How is it changing? Quote Link to comment https://forums.phpfreaks.com/topic/276596-saving-contents-of-a-div-as-a-php-variable/#findComment-1423221 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.