0

I am developing a web application with backend administration panel that allows users to insert video embedding code. This code will render the video on the corresponding page as i am echoing that code at that location.

The problem is that, when i echo the code, the code itself gets displayed instead of video being shown. Where i am going wrong?

Here is the code entered by user in the textarea in admin panel:

<pre>
<object id="vp110mFH" width="432" height="240" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"><param name="movie" value="http://static.animoto.com/swf/w.swf?w=swf/vp1&e=1340255540&f=10mFH15tm8Wyv1UT85DhEA&d=72&m=p&r=360p&volume=100&start_res=360p&i=m&ct=Click...To%20request%20more%20Info..&cu=http://schoolanduniversity.com/study_programs/more-information.php&options="></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed id="vp110mFH" src="http://static.animoto.com/swf/w.swf?w=swf/vp1&e=1340255540&f=10mFH15tm8Wyv1UT85DhEA&d=72&m=p&r=360p&volume=100&start_res=360p&i=m&ct=Click...To%20request%20more%20Info..&cu=http://schoolanduniversity.com/study_programs/more-information.php&options=" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="432" height="240"></embed></object>
</pre>

Please guide.

Regards, Mrinal Purohit

3
  • Can you post a sample data (code inserted by users)? Commented Jun 21, 2012 at 5:09
  • unable to add the code here....may be not allowed here. It starts like this: <object id="vp110mFH" width="432" height="240" classid="clsid:d27cdb6e-ae6d-11cf-96b8-4445535400................ Commented Jun 21, 2012 at 5:14
  • @bmrinal - I'm more interested in how you actually store and retrieve the embed code from your database. Commented Jun 21, 2012 at 5:19

1 Answer 1

1

It seems like you are displaying the html entities for your embed code, you could try using html_entity_decode() to get around this. Of course a better solution would be to store the embed code in the correct format, ie not encoded as entities.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.