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灯, 水草

请输入看板名称,例如:BabyMother站内搜寻

TOP