Php 如何在wordpress中使用Ajax编辑记录?
如果这个问题已经得到回答,我很抱歉。因为我是Ajax新手,我正在尝试编辑wordpress的用户记录表。我使用for循环显示用户,查询为:Php 如何在wordpress中使用Ajax编辑记录?,php,ajax,wordpress,Php,Ajax,Wordpress,如果这个问题已经得到回答,我很抱歉。因为我是Ajax新手,我正在尝试编辑wordpress的用户记录表。我使用for循环显示用户,查询为: foreach($user_info as $newu){ ?> <tr> <td contenteditable="true" name="userid"><?php echo $newu->id;?></td> <td
foreach($user_info as $newu){ ?>
<tr>
<td contenteditable="true" name="userid"><?php echo $newu->id;?></td>
<td contenteditable="true"><?php echo $newu->user_login;?></td>
<td contenteditable="true"><?php echo $newu-> user_nicename;?></td>
<td contenteditable="true" class="editrow"><?php echo $newu-> user_email;?></td>
<td><input type="submit" id='<?php echo $newu->id; ?>' class="todelete" name="delete" value='Delete' /></td>
<td><input type="submit" id='<?php echo $newu->id; ?>' class="toedit" name="edit" value='Edit' /></td>
</tr>
<?php } ?>
foreach($user\u info as$newu){?>
并且输出为:
Delete工作得很好,但对我来说很难编辑。如果能提供简单明了的解决方案,我将不胜感激。谢谢
userid
以外的字段缺少Name属性,没有Name属性,表单操作将无法序列化数据。userid以外的其他内容缺少Name属性,顺便说一句,您不能直接从FrontEnd更改用户名添加您尝试的代码