Click here to Skip to main content
11,804,574 members (76,364 online)
Rate this: bad
Please Sign up or sign in to 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.

<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.]
any other way to store the video and play the video in php or html page.

Please help me!.
Posted 19-Sep-12 4:52am
Edited 19-Sep-12 5:57am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
Sourav Sarkar-SS at 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 at 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
Sourav Sarkar-SS at 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 at 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 ?>
Sourav Sarkar-SS at 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)

  Print Answers RSS
0 OriginalGriff 3,205
1 Maciej Los 1,950
2 KrunalRohit 1,907
3 CPallini 1,855
4 Richard MacCutchan 1,187

Advertise | Privacy | Mobile
Web04 | 2.8.151002.1 | Last Updated 19 Sep 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100