I’m new to coding, and I cannot figure out how to input the storage code with cookies into the wix api.
Could someone break it down for me.
So far I have this but since it’s not working it probably isn’t right.
//TODO: <?php function wp_set_all_cookies() {if ($_COOKIE["viewed1"] != get_the_title()){setcookie("viewed3", $_COOKIE["viewed2"], time()+3600, "/", ".cookie.com"); setcookie("viewed2", $_COOKIE["viewed1"], time()+3600, "/", ".cookie.com"); setcookie("viewed1", get_the_title(), time()+3600, "/", ".cookie.com");\}} ?> import {session} from ‘wix-storage’;
Hi,
Note that you were trying to add PHP code to the site. The code editor supports only Javascript.
You can use the Wix-Storage API to save information to the browser.
I have a multi language page and i would like to store some user information in local, memory or session storage. The informations are stored in something like https://de.mypage.org, https://en.mypage.org and https://fr.mypage.org, depending on the shoosen language. Each site has access to his own namespace.
When i switch the language, the site is rendered again. So from one language i could not access the local storage and all data in session or memory stored in another namespace. What is the best to solve this problem?