Declare multiple var and send to PHP
Im trying to declare multiple var's and then sent them to php, i managed with only one 'var' but not when adding more
This below works
- $(document).ready(function(){
- $(".temp").mouseover(function(){
- $.post('write.php', 'valTemp=' + $('#temp').val(),
- function (response) {
- alert( $('#temp').val());
- });
- return false;
- });
- });
What i want to do is
- $(".temp").mouseover(function(){
-
- var valTemp = $('#temp').val()
- var valWind = $('#wind).val()
- var valSun = $('#sun).val()
- $.post('write.php', 'valTemp', valWind, valSun,
- function (response) {
- alert( $('valTemp'), $('valWind'),);
- });
- return false;
- });
- });