This is really hard to explain but I am going to try me best,
I have an html page which displays a video player named brosweplayer.html,
the code is this,
<!DOCTYPE html>
<html lang="en">
<head>
<title>Untitled Document</title>
<meta charset="utf-8"/>
</head>
<body>
<video src="$name" controls="controls">
</body>
</html>
Now, I also have a php script which selects data from my database and displays
the results onto another webpage which is the users account page. The code is this,
session_start();
$email=$_SESSION['email_of_user'];
$con = mysql_connect("hostname.com","username","password");
if (!$con) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db("radhalfs", $con);
$result = mysql_query("
SELECT videos.videoname,videos.name
FROM videos,
fgusers3
WHERE videos.email='$email' AND fgusers3.email='$email'
");
echo "Uploaded Videos";
while ($row = mysql_fetch_array($result)) {
$link=$row['videoname'];
$file_location=$row['name'];
echo "<div id=\"videos_uploaded_by_user\">";
echo "<a href='uploads/upload/browseplayer.html'>$link</a>";
echo "</div>";
}
mysql_close($con);
What it displays is the name of all the videos which the user uploaded in hyperlinks,
but the user gave the videos fake names when they uploaded them. This is so the videos
would be easier to read, they are displayed as 'videoname' in the code.
It also selects the real name of the video, which is displayed as 'name' in the code.
The real name of the video is the name they are saved as in my directory.
What I want is for when the user clicks on one of their many video hyperlinks
to have them redirected to the browseplayer.html file so the video will be played.
But it has to play the video which was being displayed on the hyperlink, on the webpage.
For an example, lets say the user uploaded a video with a real name of win.mp4,
he then renames the video to Funny. That video is saved to my directory as win.mp4.
The name Funny and win.mp4 are saved into a database.
The user then goes to see all the videos which he uploaded,
it displays all of his videos in hyperlinks, which display the fake name given by the user,
so in this case it displays Funny in a hyperlink. He then clicks on that link and it
redirects him to browseplayer.html where is plays the video win.mp4.
I hope you understood what I am trying to ask. If you think you can help leave some comments,
and if you didnt understand some parts of what I was saying, let me know and I will try to
clarify them with you. Thanks a lot.