Is there any way to pass a javascript variable to a php function or simply assign a js variable to a php variable….???
test(“asdas”); I need to update “asdas” to a dynamic value, i.e of the form,
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can pass value from js to PHP using ajax request or add js value to URL and then reload page.
Variant #1 (using ajax):
JS side (jquery)
PHP side
Variant #2 (with page reload):
JS side
PHP side