2015-09-22 08:30
浏览 84

未捕获的ReferenceError:未定义$ _POST

I'm new in AJAX and want to send 2 IDs on an AJAX page here is my code

<a href="#" id="<?php echo $st_rows4['module_id'];?>" class="edit3">Click Here</a>

$(document).ready(function() {
    $(".edit3").click(function() {
        var moduleID    = $(this).attr('id');
        var studentID   = $_POST['studentAssignID']; //Problem is Here
            type: "POST",
            url: 'assign-assignment-ajax.php',
            data: "moduleID="+moduleID+"&studentID="+studentID,
            success: function(data)

I'm getting module ID by clicking on a href, while I also want student ID with it, which part i'm doing wrong?

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

2条回答 默认 最新

相关推荐 更多相似问题