Hello. I’ve searched around a bit for this information and have found things somewhat close, but stll nothing helpful enough. I’m pretty new to php, and I believe I’ll need javascript for this too. I’m developing a game in php, and currently, when you battle a monster, or do any action, either it goes to another page, or reloads the current page with the information.
What I want to do, is have it so clicking a submit button…let’s say for fighting, instead of going to battle.php to load all of the battle information, it loads it in the index.php page, without the need to reload, loading instantly in the current frame. I’m pretty sure just a small demo will get me going. So instead of going in depth about the code, I’ll use a small example.
How would I have it so when I hit my submit button, it displays “You are fighting a $monstername!” in the current frame, without the whole page reloading or changing? Any help would be great. I really have no idea where to begin with this.
I just think it’d be much easier doing this, than to have to always change pages, and reloading chat because the page refreshes everytime. Thanks in advance for any help.