douning5041 2014-07-13 22:43
浏览 18

Mysqli从db中选择youtube watch id,插入php

I've been wrestling with this for several hours now. Searched google and stackoverflow. Not getting anywhere. I'm trying to access a youtube watch id from a database, and insert it into an embed. No errors. $con is fine. Accessing the table is fine. My sql query works in phpmyadmin. The embed video shows, but doesn't have a watch idea, so it just gives fuzz when you press play. I'm out of ideas. Please help, and thank you very much.

Here is my php.

$sqlVideo = "SELECT watchid FROM video WHERE id = 1;";

if ($resultVideo = mysqli_query($con, $sqlVideo))
{
      while($row = mysqli_fetch_assoc($resultVideo)) 
      {

echo '<embed width="560" height="315" src="//www.youtube.com/embed/'.$row['watchid'].'?        autoplay=1" frameborder="0" allowfullscreen></embed>';
}
}
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 init i2c:2 freq:100000[MAIXPY]: find ov2640[MAIXPY]: find ov sensor是main文件哪里有问题吗
    • ¥15 运动想象脑电信号数据集.vhdr
    • ¥15 三因素重复测量数据R语句编写,不存在交互作用
    • ¥15 微信会员卡等级和折扣规则
    • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
    • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
    • ¥15 gdf格式的脑电数据如何处理matlab
    • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
    • ¥100 监控抖音用户作品更新可以微信公众号提醒
    • ¥15 UE5 如何可以不渲染HDRIBackdrop背景