Click here to Skip to main content
13,199,680 members (54,087 online)
Rate this:
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
Updated 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 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
Sourav Sarkar-SS 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 ?>
Sourav Sarkar-SS 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
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.171020.1 | Last Updated 19 Sep 2012
Copyright © CodeProject, 1999-2017
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