1

Possible Duplicate:
How to pass JavaScript variables to PHP?

How to get a variable that is not inside a <form> tag

var vvv = document.getElementById('vvv'); 

into php

$variable=vvv.value;
Community
  • 1
  • 1
Tony
  • 1,175
  • 4
  • 14
  • 22
  • 1
    Can you rewrite the question for better understanding? Are you trying to send a JS value to PHP ? – Peon Oct 10 '12 at 12:41
  • 1
    Create a hidden element and assign the javascript value to it using the element's ID – asprin Oct 10 '12 at 12:43

1 Answers1

5

I suspect you talk about javascript to php variable. To understand how this works you will probably need to use AJAX. This is a good start: JQuery AJAX

Once you get a hold of that you can send your javascript-variable to a PHP-webservice and have fun with it.

Undrium
  • 2,558
  • 1
  • 16
  • 24