This is my first question here, probably a very simple one but I can’t really find how to do it.
When I tried to google it, I only came across cookies and sessions, but I don’t know how to use them, and was hoping there was a more simple way. I only started with PHP today.
On the following page I want the user to be able to switch background, text color, text decoration, etc. I got that to work as well, but I would love to find a way to save the previous choice, and add it to the next one.
So if someone picks a red background-color, it should not switch back to white when they pick another style, such as a black text color.
Is there a easy way (for starters like me) to fix this?
This is the site so far: http://mark.wigf7.sde.dk/PHP/opgave_g.php?baggrundfarve=FF8000
To use the
$_SESSIONsuperglobal, first begin by adding this to the top of your PHP script(s):Then you can store data in
$_SESSIONand access it later.On next page:
EDIT: Since you linked to the page you’ll be using: