954,580 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to display video or audio element using php script?

ello..
i cannot display the video or audio that i already upload in database..why and how should i do??

keroppi89
Newbie Poster
2 posts since Dec 2011
Reputation Points: 10
Solved Threads: 0
 

What have you tried so far ?

pritaeas
Posting Expert
Moderator
5,483 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
 

For a first post that's pretty vague. Care to elaborate?

diafol
Rhod Gilbert Fan (ardav)
Moderator
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
 

HAHA.. POST your code and tell us which part is wrong/not workin'

Cheers,

rotten69
Posting Whiz
346 posts since May 2011
Reputation Points: 3
Solved Threads: 16
 
keroppi89
Newbie Poster
2 posts since Dec 2011
Reputation Points: 10
Solved Threads: 0
 

and you expect this echo "$name
";
to deliver your audience the video or the audio?

Shouldn't it be like this?
echo ''.$name.'
';

How about the file extension? Is it included in your $name? If not, it should be wiser to find the extension of the file $dir.$name first and then assign the extension to $ext. so that the codes will be
echo ''.$name.'
';

I am assuming here that $dir = "someDirectory/"; and $name = "somefile.whateverext";

If you want the video to play on the page, then you should have a way of delivering the $name.$ext to the next page, so that it will be loaded on the player. The above codes, just gives the browser to download the file and not to play it.

There are so many ways in passing the video info. to the play page.. In fact, the most common is either by $_GET, or by session like in
$_SESSION['something'] = $name.$ext; whatever you choose, it has to have the $dir.$name.$ext because player can be different for audio and video.

veedeoo
Posting Pro in Training
438 posts since Oct 2011
Reputation Points: 149
Solved Threads: 60
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: