Click here to Skip to main content
15,883,984 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I am developing a website where I need to play video which will be uploaded by the users. How I thought that only the path of the video to be stored by MySql.
I got a code to play the video.

HTML
<figure class="style-img-2 fleft">
<a class="lightbox-image" href="video/video_AS3.swf?width=495&height=275&fileVideo=aa.flv" data-gal="prettyVideo[prettyVideo]">
<img src="images/page1-img2.jpg"  alt=""></a></figure>


I want the url to be dynamic , coming from mysql through php.
[instead of aa.flv, i need mysql/php code to replace that url.]
or
any other way to store the video and play the video in php or html page.

Please help me!.
Posted
Updated 19-Sep-12 5:57am
v2

1 solution

You could store your video base URL as a setting (which should be the URL relative to the folder where the videos are located), and in MySQL only save the video name.

In this way, you always have it available dynamically. For instance, your website address may be http://localhost/yourproject, with the video base url http://localhost/yourproject/videos, assuming (that's where you save all the videos), and then only append the video name to get a full link.

I hope I'm making myself clear.
 
Share this answer
 
Comments
[no name] 19-Sep-12 11:57am    
no, its not my problem.
Mysql , php code are needed.
instead of aa.flv, i need mysql/php code to replace that url.
Andrei Straut 19-Sep-12 12:21pm    
Hoho, if what you need is code, then I'm afraid you won't get any. CodeProject policy, which I fully support, is not to provide ANY code unless we see your own, and the problem you encounter and need help with is relatively small. We don't do your work for you
[no name] 19-Sep-12 12:46pm    
dear andrei
I know the codeproject policy too.
I provide you the code
just want to change the code
replace the aa.flv to php/mysqlcode code
Andrei Straut 19-Sep-12 12:57pm    
Assuming you have the name of the video available in your PHP script already, replace your aa.flv with <?php echo $name_of_your_video_url ?>
[no name] 19-Sep-12 13:33pm    
can't you see php/mysql?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900