dtv7174 2015-10-22 20:54
浏览 35

将表单数据从iframe发布到MySQL

I'm using javascript to populate input text fields in a form inside the iframe. Then I programmatically submit the form to itself, the iframe, which has PHP code at the top to update data in the database. When I inspect element network I can see the posted data, but it's not getting into the data base. I have error reporting turned on but I'm not getting any errors. Sorry I don't have the code in front of me to post.

I have included the database connection in the iframe aswell, not sure if the included database from the parent window is also passed to the child iframe.

Thanks for the help!

  • 写回答

2条回答 默认 最新

  • dsgwoh7038 2015-10-22 20:59
    关注

    The iFrame would need the database connection as well. adding that should help however still odd your IFrame is not throwing a no database connection error.

    Is your PHP wrapped in some form of

    if(isset($_POST)){ //connect to database, run mysql query }
    
    评论

报告相同问题?

悬赏问题

  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度