Passing var from php to javascript
- by marc-andre menard
I try to do something pretty strait... getting php value to javascript
here is the page
here is the code..
<script language="javascript">
<?php $imagepath = $_REQUEST["path"]; ?>
var whatisthepath = <?php $imagepath; ?>
alert (whatisthepath);
</script>
ALWAYS getting UNDEFINE.... why ?