I want to insert Facebook Embedded Post in to mysql database table EMBEDDED_POST_MASTER.
My Facebook Embedded Post is:
<div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-post" data-href="https://www.facebook.com/photo.php?fbid=634747619920534&set=a.541467239248573.1073741828.523671034361527&type=1" data-width="466"><div class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/photo.php?fbid=634747619920534&set=a.541467239248573.1073741828.523671034361527&type=1">Post</a> by <a href="https://www.facebook.com/SilkyQuoteOfficial">SilkyQuote</a>.</div></div>
When i am inserting this embedded post into table its gives error like :
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'div id=\"fb-root\">
I also use $insert_data = mysql_real_escape_string($input_data);
but it is not working, still same error comes, when i insert without embedded post then its inserted successfully.
means the error accure only when i insert Embedded post.