[英]how can I add a post identifier to my ajax
I want to add a post identifier to my ajax. 我想向我的ajax添加帖子标识符。 Basically right now the way that I identify my post is by checking if one of the inputs is present.
基本上现在,我识别我的帖子的方式是通过检查是否存在输入之一。 Here is the code:
这是代码:
<input name="id" id="id" type="text">
If the input with name id is present posted then I execute my php code. 如果输入名称为id的输入,则执行我的php代码。 Here is the code:
这是代码:
if(isset($_POST['id'])){
The issue that I am having is that I want to put multiple id posts in the same page so I need to sort them to know what is post is doing. 我遇到的问题是,我想在同一页面上放置多个id帖子,因此我需要对它们进行排序以了解帖子在做什么。 I want to add a post identifier.
我想添加一个帖子标识符。
if(isset($_POST['addLogin'])){
How can I add a post identifier to this ajax function. 我如何添加一个职位标识符到这个ajax函数。 Here is the code:
这是代码:
$(function() {
$("button#loginSubmit").click(function(){
$.ajax({
type: "POST",
url: "",
data: $('form.loginForm').serialize(),
I wanted to add something like a {last_time:last_time}
How can I add post identifier? 我想添加类似
{last_time:last_time}
如何添加帖子标识符?
像这样:
data: { last_time : "test"}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.