0

Pass php var into js

Hi Is it possible to Use another php variables (like form Processing file that is different from main file) into JS?

16th Sep 2020, 6:05 PM
Mohammad Sajjad
Mohammad Sajjad - avatar
3 Réponses
+ 2
Did you mean php variables like $a = 12 Need to be transferred to JS
18th Sep 2020, 5:46 AM
Steve Sajeev
Steve Sajeev - avatar
+ 1
Ok, If i am right You can make an input in html and set it to be disabled Then using php set its value to the variable's value you want to share... Then using js get the input value...
18th Sep 2020, 8:07 AM
Steve Sajeev
Steve Sajeev - avatar
0
Steve Sajeev no, some thing like $_POST('...') that is in other php file for get form information.
18th Sep 2020, 6:51 AM
Mohammad Sajjad
Mohammad Sajjad - avatar