我的页面中有一个表格。我希望由用户填写的表单详细信息通过特定电子邮件发送。
这是我的表格:
xtype: 'formpanel',
width: 300,
height: 900,//recommended for the build
url: 'contact.php',
scrollable:false,
items:[
{
xtype: 'textfield',
name : 'name',
label: 'Name',
labelWidth:100
},
{
xtype: 'textfield',
name : 'Date of birth',
label: 'Date of birth',
maxLength: 10,
labelWidth:120
},
{
xtype: 'textfield',
name : 'Nationality',
label: 'Nationality',
labelWidth:100
},
{
xtype: 'textfield',
name : 'City of Residence',
label: 'City of Residence',
labelWidth:170
},
{
xtype: 'textfield',
name : 'Country',
label: 'Country',
labelWidth:100
},
{
xtype: 'textfield',
name : 'Date',
label: 'Starting date of this course',
labelWidth:220
},
{
xtype: 'fieldset',
title: '3. Course to join',
items: [
{
xtype: 'selectfield',
label: 'Choose one',
labelWidth:120,
options: [
{text: 'Ayurveda Massage (Ayurveda Yoga Massage)', value: 'first'},
{text: 'Ayur Balance Massage', value: 'second'},
{text: 'Abhyanga Massage with Shirodhara', value: 'third'}
]
}
]
},
{
xtype: 'numberfield',
name : 'Date',
label: 'Starting date of this course',
labelWidth:220
},
{
xtype: 'numberfield',
name : 'Your Phone',
label: 'Your Phone',
labelWidth:120
},
{
xtype: 'toolbar',
items: [
{
xtype: 'button',
height: 30,
text: 'Submit',
ui : 'confirm',
handler : function(button) {
this.up('formpanel').submit();
}
}
]
}
]
这是我的 php 脚本:
<?php
// Configuration Settings
$SendFrom = "Form Feedback <jainishan@yahoo.in>";
$SendTo = "ishan.fzd@gmail.com";
$SubjectLine = "Feedback Submission";
// Send E-Mail and Direct Browser to Confirmation Page
mail($SendTo, $SubjectLine, $MsgBody, "From: $SendFrom");
?>
在点击表单按钮时,我收到以下异常:
您正在尝试解码无效的 JSON 字符串:
Parse error : syntax error, unexpected '.=' (T_CONCAT_EQUAL) in E:\softwares\Sencha dwnlds\xampp\htdocs\RasovaiApp\contact.php第11行
注意:“我在发送电子邮件时遇到问题。我什至无法发送基本电子邮件。”
任何帮助都会非常有用。
谢谢伊山耆那教