dongshuo2752 2013-04-10 18:26
浏览 38

在php中使用javascript函数变量[duplicate]

This question already has an answer here:

I have a javascript function. It has a variable that takes a particular value (entered by user). I need to insert this value in an sql database. I know I cannot use javascript to connect to database, I need to use php for that. Can you tell me how to do that? Just explain, I will write the code. I mean, do i need to create a new php file (but then if i create a new php sheet,then how can i access this variable bcz its in an all together different php sheet) or can I write in the same file, stuff like this....

</div>
  • 写回答

1条回答 默认 最新

  • doubeng9407 2013-04-10 18:28
    关注

    Sounds to me like you need an AJAX call to a separate PHP file to process the script and return the values to the JavaScript.

    评论

报告相同问题?

悬赏问题

  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题