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

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何通過電子郵件 Laravel PHP 從表中發(fā)送 JSON 數(shù)據(jù)

如何通過電子郵件 Laravel PHP 從表中發(fā)送 JSON 數(shù)據(jù)

PHP
茅侃侃 2022-07-22 15:17:05
我想從各種下拉框中完成的 HTML 表中獲取所有數(shù)據(jù)。我能夠成功通過電子郵件發(fā)送所有輸入字段,但無法弄清楚如何獲取 JSON 數(shù)據(jù)。我已將表數(shù)據(jù)轉(zhuǎn)換為 JSON,并且變量記錄正常。沒有后端數(shù)據(jù)庫,所有數(shù)據(jù)都是客戶端和靜態(tài) HTML。HTML<div class="row"><h4 class="info-text"> Tell us about yourself and the project you are working on.</h4><div class="col-sm-5 col-sm-offset-1">    <div class="form-group">        <label>Contact Name <small></small></label>        <input name="name" type="text" class="form-control" placeholder="Contact Name..." id="name">    </div>    <div class="form-group">        <label>Contact Number <small></small></label>        <input name="phone" type="text" class="form-control" placeholder="Number..." id="number">    </div></div><div class="col-sm-5 ">    <div class="form-group">        <label for="project">Please tell us a little about the project you are working on <small></small></label>        <textarea class="form-control" name="project" rows="5" id="project"></textarea>    </div></div><div class="col-sm-10 col-sm-offset-1">    <div class="form-group">        <label>Email <small></small></label>        <input name="email" type="email" class="form-control" placeholder="email@email.com" id="email">    </div></div><div class="col-sm-10 col-sm-offset-1">    <div class="form-group">        <label>Upload a file should you wish to</label>        <input name="file" type="file" class="btn btn-info" placeholder="email@email.com">    </div></div><table class="table">    <thead>        <tr>            <th scope="col">#</th>            <th scope="col">Product</th>            <th scope="col">Ancillary Quantity</th>            <th scope="col">Fire Rating</th>            <th scope="col">Void Gap (mm)</th>            <th scope="col">Cut Type</th>            <th scope="col">Quantity</th>            <th scope="col">Bracket Finish</th>        </tr>    </thead>    <tbody>        <tr>        </tr>    </tbody></table>這是用于表格數(shù)據(jù)的 jQuery 循環(huán)$("#next").click(function () {var table = $("table tbody");table.find('tr').each(function (i) {});
查看完整描述

1 回答

?
慕尼黑8549860

TA貢獻1818條經(jīng)驗 獲得超11個贊

在您的控制器上使用json_decode()

$tableData = json_decode($request->row, true); # true -- get as array

然后將 $tableData 傳遞給您的電子郵件刀片并打印。

https://www.php.net/manual/en/function.json-decode.php


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

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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