By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,741 Members | 2,004 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,741 IT Pros & Developers. It's quick & easy.

Pulling javascript code from mysql

P: 1
Hi all,

Not sure whether this is a javascript or MySql issue.

Have below javascript code of embedded flash player stored in text field in MySql, with php reading it into a variable and echoing it, however no player shows.

Code is seen when a view source of page is done, so it's reading it out ok. Am I missing escape characters or something else completely?

Code runs ok in a normal html page.
thx in advance

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript" src=""></script>
  2. <script type="text/javascript">
  3. var s1 = new SWFObject("","player","400","300","9");
  4. s1.addParam("allowfullscreen","true");
  5. s1.addParam("allowscriptaccess","always");
  6. s1.addParam("flashvars","file=");
  7. s1.write("preview");
  8. </script>
Sep 23 '08 #1
Share this Question
Share on Google+
1 Reply

P: 13,264
Could you post the PHP code as well.
Sep 23 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.