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

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

php表單提交至mysql怎么同時(shí)發(fā)送至指定郵箱

php表單提交至mysql怎么同時(shí)發(fā)送至指定郵箱

慕桂英546537 2019-03-13 14:22:47
現(xiàn)在通過html提交表單,可以實(shí)現(xiàn)把數(shù)據(jù)插入到mysql中,php代碼如下? <?php?? ? session_start();?? ? $username=$_REQUEST["username"];?? ? $phone=$_REQUEST["phone"];?? ? $datetime=$_REQUEST["datetime"];?? ? $con=mysql_connect("localhost","root","root");?? ? if (!$con) {?? ? ? die('數(shù)據(jù)庫(kù)連接失敗'.$mysql_error());?? ? }?? ? mysql_select_db("user_info",$con);?? ? $dbusername=null;?? ? $dbphone=null;?? ? $result=mysql_query("select * from user_info where phone ='{$phone}' and isdelete =0;");?? ? while ($row=mysql_fetch_array($result)) {?? ? ? $dbusername=$row["username"];?? ? ? $dbphone=$row["phone"];?? ? }?? ? if(!is_null($dbphone)){?? ?>?? <script type="text/javascript">?? ? alert("手機(jī)號(hào)已存在");?? ? window.location.href="index.html";?? </script>??? <?php??? ? }?? ??? ? mysql_query("insert into user_info (username,phone,datetime) values('{$username}','{$phone}',now())") or die("存入數(shù)據(jù)庫(kù)失敗".mysql_error()) ;?? ? mysql_close($con);?? ?>?? <script type="text/javascript">?? ? alert("注冊(cè)成功");?? ? window.location.href="index.html";?? </script>?如何在這個(gè)基礎(chǔ)上同時(shí)把插入數(shù)據(jù)庫(kù)的內(nèi)容發(fā)送至指定郵箱呢?有沒有案例參考?
查看完整描述

6 回答

?
料青山看我應(yīng)如是

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

composer 引入phpmailer/phpmailer 依賴phpmailer/phpmailer


查看完整回答
反對(duì) 回復(fù) 2019-03-29
?
蠱毒傳說

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

我就是這么做的,但是發(fā)送很慢,導(dǎo)致提交表單要等很久。


查看完整回答
反對(duì) 回復(fù) 2019-03-29
?
12345678_0001

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

發(fā)送郵件放入異步隊(duì)列處理


查看完整回答
反對(duì) 回復(fù) 2019-03-29
?
米脂

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

headfirst php&mysql有同樣項(xiàng)目


查看完整回答
反對(duì) 回復(fù) 2019-03-29
?
三國(guó)紛爭(zhēng)

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

我覺得直接用大廠的郵件發(fā)送api比較方便點(diǎn)


查看完整回答
反對(duì) 回復(fù) 2019-03-29
  • 6 回答
  • 0 關(guān)注
  • 954 瀏覽
慕課專欄
更多

添加回答

舉報(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)