We are about to switch to a new forum software. Until then we have removed the registration on this forum.
In a Game I'm making, I need to save stuff to a .txt file (or JSON if you show me how) and I'm able to save files but not edit them or save them to specific space in my Project Folder. Please tell me if there is any way I can edit files with javascript or how to send it to a PHP function. I'm also using p5.js.
Answers
Tell me if this isn't possible
@Bryce_Johnson -- I'm not sure, but given that this is not Processing-specific you may find more PHP expertise on another forum such as StackOverflow. This seems to be a common question online -- when I typed "use JavaScript variable in" into Google, it autocompleted ... "PHP":
Ok thanks I will
You can call a php page with some arguments : in JS : var data = "Data to get in php"; window.location = "mypage.php?data=" + data; in PHP : $data = $_GET["data"];
Hope it helps