5 Replies - 672 Views - Last Post: 05 December 2012 - 11:54 AM Rate Topic: -----

#1 mac.laylo  Icon User is offline

  • New D.I.C Head

Reputation: -5
  • View blog
  • Posts: 5
  • Joined: 04-December 12

Retrieve video file in mysql

Posted 04 December 2012 - 07:33 PM

how can i retrieve my video file stored from mysql database
this are my codes

<?php





$sql1= mysql_query( "select * from video");

if(mysql_num_rows($sql1) == 0){

		echo "<tr><td align =\"center\" colspan=\"3\">No video</td></tr>";
	}

while($row=mysql_fetch_array($sql1))
{

 echo "  <embed src =\"<a href= '".$row['videofile'] ."' >\" </a> " ;
  			
}

 ?>

This post has been edited by Atli: 04 December 2012 - 07:36 PM
Reason for edit:: Use [code] tags when posting code.


Is This A Good Question/Topic? 0
  • +

Replies To: Retrieve video file in mysql

#2 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3719
  • View blog
  • Posts: 5,990
  • Joined: 08-June 10

Re: Retrieve video file in mysql

Posted 04 December 2012 - 07:42 PM

Well, I can guarantee you that putting an <a> tag inside the <embed> src attribute won't work. - Do you have any experience using HTML, PHP and/or MySQL before?

Assuming your "videofile" field contains an URL to a Flash video, you need to make the PHP code print the correct HTML to show a Flash player with that Flash video. You may want to look at this article in Adobe's help docs to learn how to create HTML like that.
Was This Post Helpful? 0
  • +
  • -

#3 mac.laylo  Icon User is offline

  • New D.I.C Head

Reputation: -5
  • View blog
  • Posts: 5
  • Joined: 04-December 12

Re: Retrieve video file in mysql

Posted 04 December 2012 - 08:01 PM

thank you for your quick response, honestly im not good in programming but i can understand a little bit in php would you mind to give me a codes to retrieve my video file or you can just edit my codes posted above.. thank you so much..
Was This Post Helpful? -5
  • +
  • -

#4 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3719
  • View blog
  • Posts: 5,990
  • Joined: 08-June 10

Re: Retrieve video file in mysql

Posted 04 December 2012 - 08:17 PM

No, that I won't do. We don't hang around here to do other peoples work for them, or to be code-monkeys for non-programmers that want free code written for them. These forums are meant as a resource for programmers who need help figuring out problems in their own code, and who want to learn. If you came here hoping that somebody would give you code you could copy/paste into your site, then you are most definitely in the wrong place.
Was This Post Helpful? 3
  • +
  • -

#5 mac.laylo  Icon User is offline

  • New D.I.C Head

Reputation: -5
  • View blog
  • Posts: 5
  • Joined: 04-December 12

Re: Retrieve video file in mysql

Posted 04 December 2012 - 08:23 PM

oh im really sorry for that this is my first time to post a question in dream.in.code
i will try to figure out my codes without asking some codes to anyone here.... sorry and thank you for your advice
Was This Post Helpful? 0
  • +
  • -

#6 laytonsdad  Icon User is offline

  • Cheese and Sprinkles
  • member icon

Reputation: 440
  • View blog
  • Posts: 1,867
  • Joined: 30-April 10

Re: Retrieve video file in mysql

Posted 05 December 2012 - 11:54 AM

http://flash-clocks....-embed-tag.html
Take a look to refresh how to use embed tag

View Postmac.laylo, on 04 December 2012 - 08:23 PM, said:

oh im really sorry for that this is my first time to post a question in dream.in.code
i will try to figure out my codes without asking some codes to anyone here.... sorry and thank you for your advice

If you have a specific question we will be more than willing to help you learn. We however do not write code for you.
Was This Post Helpful? 2
  • +
  • -

Page 1 of 1