Login | Register | FAQ
Anonymous

Javascript variables transferred

+ Post a reply

2 posts Page 1 of 1


Javascript variables transferred

by Jono » Sat May 11, 2013 9:29 pm

Is there anyway to transfer javascript variables to php variables and vice-versa?
User avatar

Jono

  • Posts: 44
  • Joined: Wed Oct 24, 2012 1:10 pm

Re: Javascript variables transferred

by XainPro » Wed May 15, 2013 8:21 am

you can transform php variable into javascript like
<script>
var ABC = <?php echo $php_Variable; ?>
</script>
and by state forward way no you can not transform javascript variable into php variable
but yes there is a way to send javascript variable to php script which is called
AJAX technique
for learning ajax you can follow this tutorial
http://www.w3schools.com/ajax/
User avatar

XainPro

  • Posts: 3706
  • Joined: Fri Feb 17, 2012 8:10 pm


+ Post a reply

Page 1 of 1