Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Javascript HTML PHP MySQL Video , +
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.]
or
any other way to store the video and play the video in php or html page.
 
Please help me!.
Posted 19-Sep-12 5:52am
Edited 19-Sep-12 6:57am
v2

1 solution

Rate this: bad
good
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.
  Permalink  
Comments
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 Kornfeld Eliyahu Peter 275
1 Maciej Los 204
2 Sergey Alexandrovich Kryukov 200
3 King Fisher 185
4 OriginalGriff 183
0 OriginalGriff 6,223
1 DamithSL 4,724
2 Maciej Los 4,196
3 Kornfeld Eliyahu Peter 3,894
4 Sergey Alexandrovich Kryukov 3,496


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