I have saved the javascript in a mysql(phpMyAdmin) database. When I display it on the front end from the database using php it is showing as string, not as javascript. Here is the javascript code in mysql:
<script type="text/javascript" src="http://i0.poll.fm/survey.js" charset="UTF-8"></script>
<noscript><a href="http://rohan44.polldaddy.com/s/test">Take Our Survey!</a></noscript>
<script type="text/javascript">
polldaddy.add( {
type: 'button',
title: 'Take Our Survey!',
style: 'inline',
text_color: '000000',
domain: 'rohan44.polldaddy.com/s/',
id: 'A8D2AA9FAF96DA61'
} );
</script>
The php page:
<?php $xy=mysql_query("select * from survey where id=1");
$row=mysql_fetch_row($xy);
echo '<div id="survey">'.$row[1].'</div>'; ?>
How can this work as javascript?