/    Sign up×
Community /Pin to ProfileBookmark

WordPress: Send data from JS file to database

Hey guys,
So, I am trying to add a customizable JS animation template to my wordpress website where logged in users will be able to change different parameters of the js animation and save their modified animations to their profiles. So, I would like to be able to take the numeric data from the js file and send it to the WordPress database under each specific user but I’m not entirely sure how to go about doing that. If someone could give me some advice on how to go about doing this that would be awesome.
My other option is to use Firebase to save the data but then I have to figure out how to recall each modified template from Firebase.
Note: I am quite unfamiliar with PHP and how PHP is used in wordpress to communicate with the database. I’m a total noob when it comes to backend.

If anyone could give me some advice or guidance on how to go about doing this it would be greatly appreciated.

Thanks

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@jedaisoulJun 17.2016 — Hi and welcome to the site. As you are a "total noob" at PHP, I'd suggest you consider other alternatives. Like using a cookie? That may be simpler to set up and use than amending the WP database.
Copy linkTweet thisAlerts:
@dronesterauthorJun 17.2016 — Hi and welcome to the site. As you are a "total noob" at PHP, I'd suggest you consider other alternatives. Like using a cookie? That may be simpler to set up and use than amending the WP database.[/QUOTE]

Hmm haven't heard of that option before. I'll look into it.

Thanks
×

Success!

Help @dronester spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...