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

  • Home
  • SEARCH
  • 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 8913013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:21:21+00:00 2026-06-15T04:21:21+00:00

I have this code: echo ‘<embed src=’.$data[‘band_video_1′].’ height=300 width=453>’; to display a Youtube video..

  • 0

I have this code:

echo '<embed src="'.$data['band_video_1'].'" height="300" width="453">';

to display a Youtube video.. It works fine in Google Chrome but not in Mozilla Firefox.. What is wrong here? Should I use another html element here? How to check what browser the user is using also??

  • 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-06-15T04:21:22+00:00Added an answer on June 15, 2026 at 4:21 am

    It looks like you’re trying to directly embed a Flash object. The embed tag is an outdated one, which is mostly deprecated. (Explained here.) If you want a more reliable way to embed a Flash object, look into SWFObject.

    However, an even better solution is to embed the video as an iframe. This way, YouTube will figure out the best way to embed the player, and you don’t have to worry about browser detection. It will even use HTML5 video when necessary so it will work on iPads and other systems that don’t have Flash.

    The end result will look like this:

    <iframe width="420" height="315" src="http://www.youtube.com/embed/U0x9HtYgVqA" frameborder="0" allowfullscreen></iframe>
    

    So your server-side code will look more like this:

    echo '<iframe width="420" height="315" src="http://www.youtube.com/embed/' . $data['band_video_1'] . '" frameborder="0" allowfullscreen></iframe>';
    

    Just make sure band_video_1 is the YouTube video ID and not the full URL.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have applied this code for iframe id. <iframe id='<?php echo 'fraDisabled'.$i.$post->ID; ?>' src='<?php
I have this code (CodeIgniter): <tr> <td width=80>Gender*:</td> <td> <?php echo form_dropdown('gender', $gender_select, $gender_val);
I have this code: function Imagehover(obj,img){ jQuery(#+obj.id).attr(src,<?php echo $this->baseurl ?>/templates/codecraft.gr/images/+img+.png); } function Imageclick(obj,img){ jQuery(#+obj.id).attr(src,<?php
I have this code in PHP: <?php $data = file_get_contents('http://newsrss.bbc.co.uk/rss/sportonline_uk_edition/football/rss.xml'); $xml = simplexml_load_string($data); echo
I have this code in my view: echo form_label('State', 'state'); $options = array( 'No
Currently I have this code: <?php echo '<meta name=robots content=noindex>'; $arr = json_decode(file_get_contents(http://media1.clubpenguin.com/play/en/web_service/game_configs/ paper_items.json),true);
I have this code snippet in an email layout: <div> <?php echo $this->Html->image('Layouts/default/Logo.png', array(
I have this code: <div id=gll_select> <script> var caffe = $(#caffe).val(); $(#gll_select).load(<?php echo base_url()
I have this piece of code: $a = false; if ($a) echo 'A'; if
Say I have this line of code in the view. <?php echo CHtml::activeTextField($model,'start_time'); ?>

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.