This is my first time creating a database, and I have what I think is a very simple question.
I want my database to show youtube videos via PHP. I have already created the database with two columns: one for the ID (called "id") and for the youtube video database entry ("yt"). I have it show the table ("video") of my entries with the following code:
<?php
// Connects to your Database
mysql_connect("localhost", "username", "password") or die(mysql_error());
mysql_select_db("table") or die(mysql_error());
$data = mysql_query("SELECT * FROM video")
or die(mysql_error());
Print "<table border cellpadding=3>";
while($info = mysql_fetch_array( $data ))
{
Print "<tr>";
Print "<th>ID:</th> <td>".$info['id'] . "</td> ";
Print "<th>Video:</th> <td>".$info['yt'] . " </td></tr>";
}
Print "</table>";
?>
How to I select an individual entry and have it get the youtube database entry, so I can embed one video on one page with a URL something like
entry.php?id=# display the corresponding "yt" info?