Ive been reading rewrite but cant get my head around it so i need help please. i am currently running this on my localhost
the link to the video uses page.html?id=$id
$id is the video id on my database

My current url reads websites/aislingmcateer.com/videos.html?id=1
however i want it to read

websites/aislingmcateer.com/videos/video-id-permalink.html

When a video iss added the title is turned into a permalink so My Lovely Horse becomes my-lovely-horse

code for link is
if(mysql_num_rows($result) == 0){
echo "NO VIDEOS ADDED YET";
}else{
while($video = mysql_fetch_array($result)){
$id = $video['id'];
$title = $video['title'];
$op = "~ <a href=\"videos.html?id=$id\">$title</a><br />"; <---LINK OUTPUT HERE
}
echo $op;
}

and to display video is
$id = $_GET['id'];
if(isset($id)){
$sql = "SELECT * FROM amc_videos ";
$sql .= "WHERE id = $id AND hide = 0";
}
while ($row = mysql_fetch_array($result)){
$title = $row['title'];
$permalink = $row['permalink'];
$video .= str_ireplace("allowfullscreen", "", "{$row['embed']}");
$op .= "<h2>$title</h2><br />";
$op .= "$video";
}


im assuming permalink needs to be assigned to work in the htaccess
So how can i get the permalink displayed

htaccess so far

Options +FollowSymlinks
RewriteEngine on

RewriteRule ^(.*)\.html $1\.php