0

I have an audio player and I want to send the time when I access another link, so when it's loaded it can continue from the exact time I pass in the session any help?

0

2 Answers 2

1

Why would you need to use PHP sessions for this?

I'd use a cookie, or if older browsers are'nt an issue, local storage, or maybe a script for using cookies on older browsers and local storage on newer browsers.

There's a handy cookie plugin for jQuery.

Local storage is pretty straight forward aswell:

localStorage.setItem('timeIleft', time_variable);

and to retrieve:

var user_left = localStorage.getItem('timeIleft');
Sign up to request clarification or add additional context in comments.

1 Comment

Good idea, I not enough use cookie.
0

You need to call an AJAX requets to do that.

The URL will be a php page and will retrieve your data using $_POST['param-name'].

Or, check this way to call php page http://www.xajaxproject.org/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.