How to pass javascript variable to a PHP file in Laravel 5.1? -


i need know need passing javascript variable php file.

all have done till created form inputs values alongside have javascript variable need pass same location of form.

so how achieve in laravel 5.1?

try jquery ajax method, in can pass js variable , use in php on other server side scripting language.

ajax documentation

syntax:

$.ajax({     url: 'process.php',     method: 'post',     data:     {         variable1 : value1,     // can use these variable in process.php file         variable2 : value2     },     success: function(response)     {      } }); 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

ios - How can i populate the right swreveal view controller with an array of prototype cells created in main.storyboard -