Jump to content

Archived

This topic is now archived and is closed to further replies.

pietbez

passing php variable

Recommended Posts

Hi, can anybody please tell me how i can make "Arson" into a php variable

 


<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript">

swfobject.embedSWF(
  "open-flash-chart.swf", "my_chart",
  "550", "400", "9.0.0", "expressInstall.swf",
  {"data-file":"ofc-chart.php?crime=Arson"} );

</script>

Share this post


Link to post
Share on other sites

Like this:

 

<?php
$var = "Arson"
?>
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript">

swfobject.embedSWF(
  "open-flash-chart.swf", "my_chart",
  "550", "400", "9.0.0", "expressInstall.swf",
  {"data-file":"ofc-chart.php?crime=<?php echo $var; ?>"} );

</script>

Share this post


Link to post
Share on other sites

thank you so much,

 

that is exactly what i was looking for

 

you saved me alot of pain

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.