I am converting many of my website pages from HTML to PHP in order to make use of the mySQL features in PHP.
My first test page also had the HTML embed code for a YouTube video. When I tested the embed link, I got an “video is no longer available” error message. Further checking with the original HTML version of the page indicated that the video was actually available. Somehow, modifying the file to PHP has disrupted the embedding.
Generalized code:
blah
blah
<?php
some php scripting that works...
?>
more html coding including the YouTube embedding code
Perhaps I can process the YouTube embedding code like this:
It turns out that the HTML file that I was working with had an invalid YouTube embed string left over from experiments made while creating an embedded YouTube video page! Copying an embed string from working HTML code to the PHP code resulted in correct playback.
For you other beginners out there, the generalized PHP code structure in my first post WILL work. I bet that you can also use echo either as straight text or derived from an mySQL query just as easily!
Thanks Q1712 for the excellent troubleshooting tip!