Hello every one!! I'm new here.. I want to make a php page for embedding video iframes, so when i change video id in URL it should changes (redirects) the video below in iframe.. here is the example page.. http://dramasvid.com/vid/tune.php?v=894442 in this url when i change v= value it also changes the video. Please help me how can i make this... any help will be appreciated !! Thanks in advance
Some of these questions are really weird because the answers should be so utterly obvious... It makes me wonder if given the answer will you even know how to take the next step..... The value of "v" in the query string would be an ID. This ID number you would use to fetch the video information from your database (URL of video or embed code, title, category, description, length etc.). Then you would simply output HTML with the data you fetched from the database. That is how they do it. That is how you do it. If your next question is "how?" my next answer is read a basic php tutorial.
there are many possible ways to achieve that... 1 : If the video URL is based on that number then you don't need to have any database... I just observed that the embeded video URL is : /player/embed_player.php?vid=894442&width=728&height=400&autoplay=no Now, here it is based on that number which you send as a GET parameter... So you can make your PHP script to output : /player/embed_player.php?vid=$_GET['v']&width=728&height=400&autoplay=no So whatever value you send as v=xxxxxx, that value will be substituted as the value of vid of the embeded player... 2 : If the video URL is not based on the number you are passing then, as NetStar said, you need to store info in a database and using the number you send, you need to get the video url from the database...
karth, please stop giving bad advice. Your method may allow for SQL Injection, and either way is not how PHP is properly coded. /player/embed_player.php?vid=';%20DROP%20DATABASE%20DATABASE();--&width=728&height=400&autoplay=no
Karth didn't provide any code that interacts with a database for SQL Injection to be a concern. Your example is not harmful in any way.