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

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

正在上傳文件但未在 mysql 中執(zhí)行查詢

正在上傳文件但未在 mysql 中執(zhí)行查詢

PHP
寶慕林4294392 2021-07-02 09:02:27
我正在為我的博客開發(fā)后端,上傳圖像的代碼按預(yù)期工作,但在數(shù)據(jù)庫中沒有寫入任何內(nèi)容。當(dāng)我提交時(shí),它會(huì)上傳圖像并將其移動(dòng)到指定的文件夾,但在數(shù)據(jù)庫中沒有插入記錄。這是用于上傳的php。有沒有辦法解決這個(gè)問題?<form method="POST" action="functionabout.php" enctype="multipart/form-data">                <div class="col-md-9">                    <!-- general form elements -->                    <div class="box box-primary">                         <div class="box-header with-border">                            <h3 class="box-title">Add About Content</h3>                        </div>                        <!-- /.box-body -->                        <div class="box-body">    <div class="form-group">        <label for="heading">Heading</label>        <input placeholder="Write Heading" class="form-control" name="heading" type="text" id="heading" required>            </div>    <div class="form-group">        <label for="subheading">Sub Heading</label>        <textarea class="form-control" placeholder="Write Sub Heading" name="subheading" cols="50" rows="10" id="subheading" required></textarea>            </div>    <div class="form-group">        <label for="message">Message</label>        <textarea placeholder="Write Details" class="form-control" name="message" cols="50" rows="10" id="message" required></textarea>            </div>        <div class="form-group">        <label for="Filename">Signature</label>        <input name="Filename" type="file">            </div></div>                        <div class="box-footer fboxm">                            <button type="submit" class="btn btn-primary"><i class="fa fa-check icheck"></i>Submit</button>                            <button type="reset" class="btn btn-warning"><i class="fa fa-undo icheck"></i>Reset</button>                        </div>                    </div>                </div>                    </div>                    <!-- /.box -->                </div>                <!-- right column -->            </form>我希望同時(shí)上傳文件并更新數(shù)據(jù)庫。
查看完整描述

1 回答

?
萬千封印

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

試試這個(gè) :


$conn = mysqli_connect('localhost', 'root', '', 'db');

    //Writes the information to the database

    mysqli_query($conn,'INSERT INTO about (subheading,heading,message,signature)

    VALUES ("'.$subheading.'","'.$heading.'","'.$message.'","'.$Filename.'")') ;


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

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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