MemphiS Posted November 1, 2008 Share Posted November 1, 2008 I have a deck of cards started when i press submit, then i set round to 2, and i click another submit button and i loose all data and it returns to the default value of 1. Everytime you submit and i have $card = new cards(); Does this mean all data is reset? as i want to keep the data set? Link to comment https://forums.phpfreaks.com/topic/130972-solved-keeping-a-set-variable/ Share on other sites More sharing options...
Mchl Posted November 1, 2008 Share Posted November 1, 2008 Each time you call a script, it executes and then all data is lost. If you want to keep data between calls, you have to save it (to a file, to session or to database) Link to comment https://forums.phpfreaks.com/topic/130972-solved-keeping-a-set-variable/#findComment-679896 Share on other sites More sharing options...
MemphiS Posted November 1, 2008 Author Share Posted November 1, 2008 Hmm ok thought that might the case, which sucks.. Thanks for your help Link to comment https://forums.phpfreaks.com/topic/130972-solved-keeping-a-set-variable/#findComment-679897 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.