I am not getting any errors with this bit of code, but that's the problem. When you get errors you can find a fix for that error,but I am not getting anything returned to the screen. I have tried breaking it down bit by bit, but I keep getting no return.
Could anyone give me an explanation why this isn't working?
<?php
include 'dbconnect.php';
$youtubeid = ($_GET['id']);
$query = mysql_query("SELECT * FROM video WHERE youtubeid='$youtubeid' ");
$numrows = mysql_num_rows($query);
if ($numrows != 0)
//code to login
{
while ($row = mysql_fetch_assoc($query))
{
echo $row['youtubeid'];
}
//check to see if they match!
if ($youtubeid==$dbyoutubeid){
//Youtube Embed
echo '<iframe width="560" height="315" src="http://www.youtube.com/embed/'.$youtubeid.'" frameborder="0" allowfullscreen></iframe>';
}else{
echo 'Sorry that video does not exist in our library!';
}
}
?>