[英]Ajax get the POST request
我在從ajax獲取值時遇到問題。
在這個文件中,我的ajax代碼是http://websiteeonline.com/form-editable.js
我的表格與螢火蟲看起來像這樣。 http://websiteeonline.com/Screen%20Shot%202014-02-02%20at%2012.04.45%20pm.png
我使用這種PHP代碼。
<?php include('admin-header.php');
if(isset($_GET['useredit']))
{
$uid=$_GET['useredit'];
$EditUserDetails=$user_details->find_by_id($uid);
if(isset($_REQUEST['mobile']) || isset($_POST['mobile']))
{
echo "some value";
$mobile=$_GET['value'];
}
}
?>
我不知道問題在哪里我無法進入“IF”循環,我想獲得“移動”更新值,以便我可以更新到mysql DB。 請幫我。 我沒有遇到問題。
謝謝! (預先)
從您的圖片中,POST變量是name =“mobile”。 所以你的$_REQUEST['mobile']
是錯誤的。 檢查isset($_POST['name'])
然后$_POST['name'] == 'mobile'
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.