The way I got it to work is by setting different variables for each new block of text. I used a switch statement to have the blocks of text change when the corresponding image is clicked. However, when you first load the page, all you see are the images you can click to show the text.
Now I’m trying to figure out how to have text already be on the page and then be replaced when an image is clicked and not seen again until the entire page is reloaded.
Well, like I said before, I accomplished this by using a switch statement. However, on this same page, I have a tiny contact form that is also using PHP. My problem now is when you click "send" to submit the form, the page reloads/refreshes instead of staying in the current state.
If anyone knows how to make the page stay at whatever is currently loaded instead of refreshing when the "send" button is pressed, please enlighten me. Thanks!
you can use ajax to send the form in the background so the user still stays on the same page without a refresh. Or you could save the current page in a session, and after you submit the form you look in the session what page you were on and go there again.