Slide error when inserting php code

Asked

Viewed 42 times

0

I’m making a slide of videos and everything was going well until I put the php code that brings the videos from the database I insert by admin.

When I change the code below:

<div>
    <div u="player">
       <iframe pHandler="ytiframe" pHideControls="0" width="640" height="381" style="z-index: 0;" url="https://www.youtube.com/embed/JZLDb_cPMZY?enablejsapi=1&version=3&playerapiid=ytplayer&fs=1&wmode=transparent" frameborder="0" scrolling="no"></iframe>
    </div>
</div>

By this other code:

<?php
    $busca = mysql_query("SELECT * FROM usuarios  ORDER BY nome ASC");
       while ($resultado = mysql_fetch_array($busca)){
          echo "<div>
                   <div u='player'>
                     <iframe pHandler='ytiframe' pHideControls='0' width='640' height='381' style='z-index: 0;' url='".$resultado['video']."'?enablejsapi=1&version=3&playerapiid=ytplayer&fs=1&wmode=transparent' frameborder='0' scrolling='no'></iframe>
                    </div>
                </div>";
            } ?>

He brings the videos from the database but two strange things happen. The first is that the video that came with that initial image of when loaded comes black and the second is that before, if I was watching a video and clicking on next or Prev to use the video, but now it’s not pausing anymore, if anyone can help me the error is there in this php block when I change but am not seeing.

1 answer

0

Invert double quotes for single, see if it works.

echo '<div>
          <div u="player">
              <iframe pHandler="ytiframe" pHideControls="0" width="640" height="381" style="z-index: 0;" url="'.$resultado['video'].'?enablejsapi=1&version=3&playerapiid=ytplayer&fs=1&wmode=transparent" frameborder="0" scrolling="no"></iframe
          </div>
      </div>';

It’s an attempt...

  • Mastria beauty I’ll try

  • Mastria did not work but now the only thing that happens is that the video does not pause when I click on next or Prev just to get rid I based on this site http://www.jssor.com/demos/video-gallery.html

Browser other questions tagged

You are not signed in. Login or sign up in order to post.