Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3457604
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:52:50+00:00 2026-05-18T09:52:50+00:00

I’m breaking my head over this. I’m trying to insert embeddable video code, such

  • 0

I’m breaking my head over this.

I’m trying to insert embeddable video code, such as youtube/viddler/etc.. which all start with the object tag:

<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/Ahg6qcgoay4?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Ahg6qcgoay4?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>

into MySQL with PHP. I’ve looked all over the internet and there was nothing solid to make that happen. Does anyone know how to INSERT that code successfully to the database as the value for $video?

UPDATE: I figured out how to store it but now, I’m trying to call it in php, but only get the text value back, basically, the entire embed code as text is displayed instead of the video itself. Here is my display code which shows text. How can I make it show the actual video instead?

<?php
    //assuming a connection to the database exists
$sql = "SELECT * FROM table";
$result = mysql_query( $sql );
while( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) ) {
    $html = array();  //create an array of html formated values.
    $html['video'] = nl2br( stripslashes( htmlentities( $row['video'], ENT_QUOTES, 'UTF-8' ) ) );
    echo "Video:<br />{$html['video']}<hr />";
}   ?>

UPDATE: This is what the embed code looks like in the DB:

<object width=\"450\" height=\"380\"><param name=\"movie\" value=\"http://www.youtube.com/v/Z5j3CORfxmw&hl=en_US&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"http://www.youtube.com/v/Z5j3CORfxmw&hl=en_US&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"450\" height=\"380\"></embed></object>

The php code right above it pulls out this data, without the slashes and it displays the embed code perfectly as text, but the actual video does not form from that. Is there anyway to have the code displayed act as code and show the video instead of text?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T09:52:51+00:00Added an answer on May 18, 2026 at 9:52 am

    Why would you want to do this, why not simply save the various parameters values and recreate the embed code in your PHP script?

    This would be more flexible & future proof. Let’s imagine, for example , that the embed code format is changed next year, you’d have to entirely modify your database records as opposed to updating a single script.

    //Assuming that you have saved a JSON string in Mysql
    $video = json_decode($video_data);
    
    <object width="<? = $video->width;>" height="<? = $video->height;>">
       <param name="movie"    
              value="<? = $video->url;>"></param>
       <param name="allowFullScreen" 
              value="true"></param>
       <param name="allowscriptaccess" 
              value="always"></param>
       <embed src="<? = $video->url;>" 
              type="application/x-shockwave-flash" 
              allowscriptaccess="always" 
              allowfullscreen="true" 
              width="<? = $video->width;>" height="<? = $video->height;>"></embed>
     </object>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.