dplht39359 2012-05-16 18:11
浏览 23

PHP中的两种形式

I have one php file that displays two forms. THe first Form displays data of customers from a table in mysql which also includes a checkbox. The second form contains data from another table and also includes a checkbox this form contains messages. I need to send messages selected with the checkbox to the list of customers selected in the first form.

Can I do that with pure php? or will I need to use javascript? please point me to a tutorial.

  • 写回答

2条回答 默认 最新

  • dongpou7275 2012-05-16 18:27
    关注

    you need download Jquery library...and read what is ajax

    get value

    var value = $("#customer").val();
    

    we get value for selector where id="customer"

    get cheked

    if($('#customer').is(":checked")) { } else { }
    

    send data on server

    var value = $("#customer").val();
    $.ajax({
                type: "POST",
                url: "default.php",
                data: "name="+value,
                success: function(data){
                alert('ok!') ;
                }
    });
    

    we send data on server post method...we send variable value, value = value in value id="customer"

    Good luck! Sorry for my English :)

    评论

报告相同问题?

悬赏问题

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