0

conversion from javascript to php

How to store a value in a JavaScript variable into a php variable?

8th Nov 2018, 4:10 AM
RAMALINGAM R
RAMALINGAM R - avatar
5 Answers
+ 3
on client side JavaScript you have a variable. send a request to a php script with ajax. use $get[] or $post[] depending on how you sent the request to cache the variable. ez pz you can save the variable in an sql database if you want
8th Nov 2018, 6:15 AM
᠌᠌Code X
᠌᠌Code X - avatar
+ 2
You cant, javascript run in client (browser) meanwhile php run in the server You can use ajax but it basicly just make a request to php page
8th Nov 2018, 4:15 AM
Taste
Taste - avatar
+ 2
With ajax yeah its possible Or simply use javascript back end, but still js on the client and js on the server is seperated
8th Nov 2018, 4:18 AM
Taste
Taste - avatar
0
No there is a way to run javascript in pho and store values as a php variable
8th Nov 2018, 4:16 AM
RAMALINGAM R
RAMALINGAM R - avatar
0
😊
8th Nov 2018, 4:16 AM
RAMALINGAM R
RAMALINGAM R - avatar