PHP 板


LINE

看板 PHP  RSS
第一次用php做表單... 研究很久...終於有一個頭緒,但還是有些問題想不出來是哪裡出了錯... 想請諸位高手幫忙,網站如下,謝謝 http://www.chromoink.com/Chromoink%20New/red2.html 在收到mail時發生一些問題 問題一: 其First Name、Last Name及Current Suppliers都無法顯示 問題二: 在收到mail其寄件者如何設定才可以將表單裡的Email放置到其收到mail的寄件人位置 開題三: 如果沒有輸入First Name或其他空格怎麼回到表單頁請他重寫 我的原始檔如下: ===============mail.php================ <? if ($_POST['msg']!="") { $F01=$_POST['First Name']; $F02=$_POST['Last Name']; $Address=$_POST['Address']; $City=$_POST['City']; $State=$_POST['State']; $Country=$_POST['Country']; $Phone=$_POST['Phone']; $Fax=$_POST['Fax']; $Email=$_POST['Email']; $F03=$_POST['Current Suppliers']; $msg=$_POST['msg']; $sendmsg=" First Name: $F01 Last Name: $F02 Address: $Address City: $city State: $State Country: $Country Phone: $phone Fax: $Fax Email: $Email Current Suppliers: $F03 Comment: $msg "; $sendsubject=$name."Enquiry"; $harder="From: $EmailnReply-To: $EmailnX-Mailer: PHP/"; $harder .= "MIME-Version: 1.0nContent-Type: text/html ;charset=big5"; if (mail("[email protected]", $sendsubject,$sendmsg,harder. phpversion())) { echo "Thank You. Your message has been successfully transferred!!"; } }else{ echo "Error!!Insert your comments."; } ?> ===============red2.html=============== <form method=post action="mail2.php"> <TABLE height="486" cellSpacing=0> <TBODY> <TR> <TD height="63" colSpan=2 align=right class=homesmall>  <div align="left" class="style11 style1">Dstributor(Abplication for distributor) </div> <p>&nbsp;</p></TD> </TR> <TR> <TD width="88" align=right class=homesmall><P align="right" class="style5 style3 style4"><span class="style12">* </span>First name: </P></TD> <TD width=411><P class="style5"> <INPUT type="text" name="F03" size="30" > </P></TD> </TR> <TR> <td><div align="right"><span class="style5">Last name:</span></div></td> <TD class=homesmall align=right><div align="left"><span class="style5"> <input type="text" name="F02" size=30 > </span></div></TD> </TR> <TR> <td><div align="right" class="style5"> <div align="right">* Company: </div> </div></td> <TD class=homesmall align=right><P align="left" class="style5 style3 style4"> <input type="text" name="Company" size=30 > </P></TD> </TR> <TR> <TD class=homesmall align=right><P align="right" class="style5 style3 style4"> Address: </P></TD> <TD><P class="style5"> <INPUT type="text" name="Address" size=30> </P></TD> </TR> <TR> <TD class=homesmall align=right><P align="right" class="style5 style3 style4"><span class="style13">*</span> City: </P></TD> <TD><P class="style5"> <SELECT name="City" size=1 > <OPTION>Africa / Botswana</OPTION> <OPTION>Africa / Congo</OPTION> <OPTION>Africa / Egypt</OPTION> <OPTION>Africa / Ethiopia</OPTION> <OPTION>Africa / Ghana</OPTION> <OPTION>Africa / Libya</OPTION> <OPTION>Africa / Morocco</OPTION> <OPTION>Africa / Mozambique</OPTION> <OPTION>Africa / Namibia</OPTION> <OPTION>Africa / Nigeria</OPTION> <OPTION>Africa / Reunion</OPTION> <OPTION>Africa / South Africa</OPTION> <OPTION>Africa / Tunisia</OPTION> <OPTION>Africa / Zambia</OPTION> <OPTION>Africa / Zimbabwe</OPTION> <OPTION>Africa / Other</OPTION> <OPTION>Asia / Bangladesh</OPTION> <OPTION>Asia / China</OPTION> <OPTION>Asia / Hong Kong</OPTION> <OPTION>Asia / India</OPTION> <OPTION selected>Asia / Indonesia</OPTION> <OPTION>Asia / Japan</OPTION> <OPTION>Asia / Kazakhstan</OPTION> <OPTION>Asia / Korea</OPTION> <OPTION>Asia / Malaysia</OPTION> <OPTION>Asia / Mongolia</OPTION> <OPTION>Asia / Myanmar</OPTION> <OPTION>Asia / Nepal</OPTION> <OPTION>Asia / Philippines</OPTION> <OPTION>Asia / Saipan</OPTION> <OPTION>Asia / Singapore</OPTION> <OPTION>Asia / Sri Lanka</OPTION> <OPTION>Asia / Taiwan</OPTION> <OPTION>Asia / Thailand</OPTION> <OPTION>Asia / UAE</OPTION> <OPTION>Asia / Vietnam</OPTION> <OPTION>Asia / Other</OPTION> <OPTION>Central America / Aruba</OPTION> <OPTION>Central America / Costa Rica</OPTION> <OPTION>Central America / Dominican Republic</OPTION> <OPTION>Central America / Guatemala</OPTION> <OPTION>Central America / Nicaragua</OPTION> <OPTION>Central America / Other</OPTION> <OPTION>Europe / Austria</OPTION> <OPTION>Europe / Belgium</OPTION> <OPTION>Europe / Bulgaria</OPTION> <OPTION>Europe / Croatia</OPTION> <OPTION>Europe / Cyprus</OPTION> <OPTION>Europe / Czech Republic</OPTION> <OPTION>Europe / Denmark</OPTION> <OPTION>Europe / Finland</OPTION> <OPTION>Europe / France</OPTION> <OPTION>Europe / France</OPTION> <OPTION>Europe / Germany</OPTION> <OPTION>Europe / Greece</OPTION> <OPTION>Europe / Hungary</OPTION> <OPTION>Europe / Ireland</OPTION> <OPTION>Europe / Italy</OPTION> <OPTION>Europe / Kazakhstan</OPTION> <OPTION>Europe / Kirkzstan</OPTION> <OPTION>Europe / Latvia</OPTION> <OPTION>Europe / Lithuania</OPTION> <OPTION>Europe / Malta</OPTION> <OPTION>Europe / Netherlands</OPTION> <OPTION>Europe / Norway</OPTION> <OPTION>Europe / Poland</OPTION> <OPTION>Europe / Romania</OPTION> <OPTION>Europe / Russia</OPTION> <OPTION>Europe / Serbia and Montenegro</OPTION> <OPTION>Europe / Slovakia</OPTION> <OPTION>Europe / Slovenia</OPTION> <OPTION>Europe / Spain</OPTION> <OPTION>Europe / Sweden</OPTION> <OPTION>Europe / Turkey</OPTION> <OPTION>Europe / U.K.</OPTION> <OPTION>Europe / Ukraine</OPTION> <OPTION>Europe / Other</OPTION> <OPTION>Middle East / Bahrain</OPTION> <OPTION>Middle East / Iran</OPTION> <OPTION>Middle East / Israel</OPTION> <OPTION>Middle East / Jordan</OPTION> <OPTION>Middle East / Kuwait</OPTION> <OPTION>Middle East / Lebanon</OPTION> <OPTION>Middle East / Qatar</OPTION> <OPTION>Middle East / Saudi Arabia</OPTION> <OPTION>Middle East / Syria</OPTION> <OPTION>Middle East / U.A.E.</OPTION> <OPTION>Middle East / Yemen</OPTION> <OPTION>Middle East / Other</OPTION> <OPTION>North America / Canada</OPTION> <OPTION>North America / Mexico</OPTION> <OPTION>North America / U.S.A.</OPTION> <OPTION>North America / Other</OPTION> <OPTION>Oceania / Australia</OPTION> <OPTION>Oceania / New Zealand</OPTION> <OPTION>Oceania / Polynesia</OPTION> <OPTION>Oceania / The Papua New Guinea</OPTION> <OPTION>Oceania / Other</OPTION> <OPTION>South America / Argentina</OPTION> <OPTION>South America / Bolivia</OPTION> <OPTION>South America / Brazil</OPTION> <OPTION>South America / Chile</OPTION> <OPTION>South America / Colombia</OPTION> <OPTION>South America / Ecuador</OPTION> <OPTION>South America / Guatemala</OPTION> <OPTION>South America / Paraguay</OPTION> <OPTION>South America / Peru</OPTION> <OPTION>South America / Uruguay</OPTION> <OPTION>South America / Venezuela</OPTION> <OPTION>South America / Other</OPTION> <OPTION>Other / Other</OPTION> </SELECT> </P></TD> </TR> <TR> <TD class=homesmall align=right><P align="right" class="style5 style3 style4">State: </P></TD> <TD><P class="style5"> <INPUT type="text" name="State" size=30> </P></TD> </TR> <TR> <TD class=homesmall align=right><P align="right" class="style5 style3 style4">Country: </P></TD> <TD><P class="style5"> <INPUT type="text" name="Country" size=30 > </P></TD> </TR> <TR> <TD class=homesmall align=right><P align="right" class="style5 style3 style4"><span class="style13">*</span> Phone: </P></TD> <TD><P class="style5"> <INPUT type="text" Name="phone" size=30 > </P></TD> </TR> <TR> <TD class=homesmall align=right><P align="right" class="style5">Fax: </P></TD> <TD><P class="style5"> <INPUT type="text" name="Fax" size=30 > </P></TD> </TR> <TR> <TD class=homesmall align=right><P align="right" class="style5"><span class="style13">*</span> Email: </P></TD> <TD><P class="style5"> <INPUT type="text" name="Email" size="30" > </P></TD> </TR> <TR> <TD class=homesmall align=right><P align="right" class="style5 style3 style4"><span class="style13">* </span>Current<br> Suppliers: </P></TD> <TD><P class="style5"> <INPUT type="text" name="F03" size=30 "> </P></TD> </TR> <TR> <TD colSpan=2><P class="style6 style3 style4"><span class="style13">*</span>My Comments are Please tell us about yourself so we can tailor our services to fit your needs:</P></TD> </TR> <TR> <TD colSpan=2><textarea name="msg" cols="50" rows="10" id="msg"></textarea></TD> </TR> <TR> <TD colSpan=2><input name="submit" type="submit" value="Submit" /> <input type="submit" value="Reset" /></TD> </TR> </TBODY> </TABLE> </form> </div> </div> --



※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 125.229.0.184
1F:→ PHP5:<? 這種 short tab 盡量少用 改用 <?php 05/11 14:20







like.gif 您可能會有興趣的文章
icon.png[問題/行為] 貓晚上進房間會不會有憋尿問題
icon.pngRe: [閒聊] 選了錯誤的女孩成為魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一張
icon.png[心得] EMS高領長版毛衣.墨小樓MC1002
icon.png[分享] 丹龍隔熱紙GE55+33+22
icon.png[問題] 清洗洗衣機
icon.png[尋物] 窗台下的空間
icon.png[閒聊] 双極の女神1 木魔爵
icon.png[售車] 新竹 1997 march 1297cc 白色 四門
icon.png[討論] 能從照片感受到攝影者心情嗎
icon.png[狂賀] 賀賀賀賀 賀!島村卯月!總選舉NO.1
icon.png[難過] 羨慕白皮膚的女生
icon.png閱讀文章
icon.png[黑特]
icon.png[問題] SBK S1安裝於安全帽位置
icon.png[分享] 舊woo100絕版開箱!!
icon.pngRe: [無言] 關於小包衛生紙
icon.png[開箱] E5-2683V3 RX480Strix 快睿C1 簡單測試
icon.png[心得] 蒼の海賊龍 地獄 執行者16PT
icon.png[售車] 1999年Virage iO 1.8EXi
icon.png[心得] 挑戰33 LV10 獅子座pt solo
icon.png[閒聊] 手把手教你不被桶之新手主購教學
icon.png[分享] Civic Type R 量產版官方照無預警流出
icon.png[售車] Golf 4 2.0 銀色 自排
icon.png[出售] Graco提籃汽座(有底座)2000元誠可議
icon.png[問題] 請問補牙材質掉了還能再補嗎?(台中半年內
icon.png[問題] 44th 單曲 生寫竟然都給重複的啊啊!
icon.png[心得] 華南紅卡/icash 核卡
icon.png[問題] 拔牙矯正這樣正常嗎
icon.png[贈送] 老莫高業 初業 102年版
icon.png[情報] 三大行動支付 本季掀戰火
icon.png[寶寶] 博客來Amos水蠟筆5/1特價五折
icon.pngRe: [心得] 新鮮人一些面試分享
icon.png[心得] 蒼の海賊龍 地獄 麒麟25PT
icon.pngRe: [閒聊] (君の名は。雷慎入) 君名二創漫畫翻譯
icon.pngRe: [閒聊] OGN中場影片:失蹤人口局 (英文字幕)
icon.png[問題] 台灣大哥大4G訊號差
icon.png[出售] [全國]全新千尋侘草LED燈, 水草

請輸入看板名稱,例如:iOS站內搜尋

TOP