第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

如果 $_POST 值仍然相同,則 PHP 表單拒絕發(fā)送

如果 $_POST 值仍然相同,則 PHP 表單拒絕發(fā)送

PHP
溫溫醬 2022-07-22 16:55:03
我正在使用Range Sliders jQuery (picture),如果我沒(méi)有每次都更改所有值,則表單不會(huì)發(fā)送,我不知道為什么。如果有人知道如何解決這個(gè)問(wèn)題,即使修改單個(gè)值,表單也會(huì)發(fā)送。謝謝 :))發(fā)送設(shè)置.php<?phpif(isset($_POST['submit_range'])){    $temp_min_php=$_POST['temp_min_field'];    $temp_max_php=$_POST['temp_max_field'];    $hum_min_php=$_POST['hum_min_field'];    $hum_max_php=$_POST['hum_max_field'];    $eau_min_php=$_POST['eau_min_field'];    $eau_max_php=$_POST['eau_max_field'];    $lum_min_php=$_POST['lum_min_field'];    $lum_max_php=$_POST['lum_max_field'];    $conn = mysqli_connect("localhost", "root", "toor", "db");    $query = "UPDATE settings SET temp_min = '$temp_min_php',temp_max = '$temp_max_php',hum_min = '$hum_min_php',hum_max = '$hum_max_php',eau_min = '$eau_min_php',eau_max = '$eau_max_php',lum_min = '$lum_min_php',lum_max = '$lum_max_php'";    $result = mysqli_query($conn, $query);}?>設(shè)置.php            <script type="text/javascript">            $(function() {              $( "#temp-range" ).slider({                range: true,                min: 0,                max: 500,                values: [ <?php echo $row['temp_min']; ?>, <?php echo $row['temp_max']; ?> ],                slide: function( event, ui ) {                  $( "#temp_amount" ).html( ui.values[ 0 ]+ " °C" + " - " + ui.values[ 1 ]+ " °C" );              $( "#temp_min_field" ).val(ui.values[ 0 ]);              $( "#temp_max_field" ).val(ui.values[ 1 ]);                }              });              $( "#temp_amount" ).html( $( "#temp-range" ).slider( "values", 0 )+ " °C" +               " - " + $( "#temp-range" ).slider( "values", 1 )+ " °C" );            });
查看完整描述

1 回答

?
飲歌長(zhǎng)嘯

TA貢獻(xiàn)1951條經(jīng)驗(yàn) 獲得超3個(gè)贊

隱藏輸入的“值”屬性僅在移動(dòng)滑塊時(shí)設(shè)置。您需要在此處設(shè)置初始值:


<input type="hidden" id="temp_min_field" name="temp_min_field">

<input type="hidden" id="temp_max_field" name="temp_max_field">

像這樣:


<input type="hidden" id="temp_min_field" name="temp_min_field" value="<?php echo $row['temp_min']; ?>">

<input type="hidden" id="temp_max_field" name="temp_max_field" value="<?php echo $row['temp_max']; ?>">


查看完整回答
反對(duì) 回復(fù) 2022-07-22
  • 1 回答
  • 0 關(guān)注
  • 105 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)