Putting a youtube url in a database
Posted: Wed Sep 18, 2013 2:02 am
How could I succesfully put a youtube embedded code in a database?
For example, I would want something like this:
Every time I try in a <textarea> to paste this in, it doesn't allow it.So I have created a seperate column in my database for it, called youtube_vid.And then I just pasted it into an <input>, which allowed it.
Now, it works, but everything below it just dissapears.I have checked using the f12 tools, and the source says it is still there, yet it is not visible on the page.However, it does show this:
Is the problem because there is no ">" tag after the embed?
I have tried adding one, and then even that <embed> doesn't work.
What could I do?
For example, I would want something like this:
Code: Select all
<iframe width="640" height="360" src="//www.youtube.com/embed/meuM8oKDvpo?feature=player_detailpage" frameborder="0" allowfullscreen></iframe>Every time I try in a <textarea> to paste this in, it doesn't allow it.So I have created a seperate column in my database for it, called youtube_vid.And then I just pasted it into an <input>, which allowed it.
Now, it works, but everything below it just dissapears.I have checked using the f12 tools, and the source says it is still there, yet it is not visible on the page.However, it does show this:
Is the problem because there is no ">" tag after the embed?
Code: Select all
<a id="watch"><iframe width="640" height="360" src="//www.youtube.com/embed/meuM8oKDvpo?feature=player_detailpage" <p> </p>
<h2>Information by <font color="red"><a href="mailto:lordchris@strongholdheaven.co.uk">Lord_Chris</a></font></h2>
</p>
What could I do?