using form to insert HTML code into page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Headwaters
Forum Newbie
Posts: 2
Joined: Wed Oct 28, 2009 11:03 am

using form to insert HTML code into page

Post by Headwaters »

I've a client who wants to embed some of his own YouTube videos on a site that uses a PHP-based admin. page with a form to manage content.

Basically he wants to copy and paste the embed link from YouTube into the source code of his web pages using a form on the admin page.

What would be the smart way to handle this with PHP? I assume a simple text field in the form could pass the string to the PHP script, but how would the script execute inserting the raw HTML?

Thanks.
Headwaters
Forum Newbie
Posts: 2
Joined: Wed Oct 28, 2009 11:03 am

Re: using form to insert HTML code into page

Post by Headwaters »

Would "include" or "require" be the way to go here?
Post Reply