AFAIK, you can do it the other way, ie., assigning a php variable value to a javascript variable. Assigning a javascript variable value to a php variable is not possible since php is a server side scripting language.
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
I'm in a situation where I have to pass javascript variable to php without redirect (no $_get[]).
OP said he don't want to use $_GET[] ! I think he wants something like this.
<script type='text/javascript'>
var xyz;
xyz = 1000;
<?php
$value = xyz; // he wants xyz value of javascript to be assigned to php variable $value.
?>
</script>
//But this is possible
<?php
$value = 100;
?>
<script type='text/javascript'>
var xyz;
xyz = <?php echo $value; ?>;
alert (xyz);
</script>
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356