如何从url.user中检索id可以打开其他用户个人资料并发送消息。为此,我试图获得其他用户的身份。在我的网址ID中显示。无论如何都要从中获取身份。
我的网址 - http://test.com/test/index.php/dashboard/profile/15
id = 15
function reference_msg()
{
alert("hi");
$.ajax({
type: "POST",
data: {
from_id:<?php echo this->session->userdata('customers_id') ?>,
to_id : // here i want to get other profilers id
subject: '<?php echo this->input->post('subject') ?>',
message_body: '<?php echo this->input->post('body') ?>',
},
url: "<?php echo site_url("messages/send_via_ajax"); ?>",
beforeSend: function() {
},
dataType: "html",
async: false,
success: function(msg) {
}
});
}
答案 0 :(得分:0)