a_moip
和a_google_analy
是在數據庫中的其他琴絃獲得價值複選框
<?
@$c_google = $_POST['c_google_analystics'];
@$c_moip = $_POST['c_moip'];
$code = $_POST['google_analystic'];
$token = $_POST['moip_token'];
$key = $_POST['moip_key'];
if(isset($c_google) or isset($c_moip)) {
if(!isset($c_google)) {
$c_google == 0;
$code == NULL;
}
else {
$c_google == 1;
}
if(!isset($c_moip)) {
$c_moip == 0;
$key == NULL;
$token == NULL;
}
else {
$c_moip == 1;
}
$q = new Query;
$q
->update('config')
->set(
array(
'a_google_analy' => $c_google,
'a_moip' => $c_moip,
'google_analy' => $code,
'moip_token' => $token,
'moip_key' => $key
)
)
->where_equal_to(
array(
'id' => 1 // bug fix
)
)
->run();
}
else {
$q = new Query;
$q
->update('config')
->set(
array(
'a_google_analy' => 0,
'a_moip' => 0,
'google_analy' => NULL,
'moip_token' => NULL,
'moip_key' => NULL
)
)
->where_equal_to(
array(
'id' => 1 // bug fix
)
)
->run();
}
?>
我做的陣列中的打印,變量沒有被處理的整數,當「上」檢查總是出現。
是它可以顯示你的HTML代碼? – liyakat 2013-05-09 08:21:08
當你足夠新鮮時,請告知什麼是要解決的實際問題? – 2013-05-09 08:21:15
是的。你真的需要放鬆,而不是尋求幫助。目前完全不清楚你在說什麼。至少,顯示您遇到問題的複選框的HTML代碼。但作爲猜測 - 爲該輸入標籤指定值。 – 2013-05-09 08:22:47