gpt4 book ai didi

extjs - 在 Sencha Touch 2 中提交表单

转载 作者:行者123 更新时间:2023-12-02 05:07:03 26 4
gpt4 key购买 nike

我正在尝试使用我下载的 SDK 中提供的标准表单提交表单。

有人知道它是如何通过的吗?关于如何通过它的任何提示?

我正在尝试制作一个非常简单的提交表单来收集一些信息。

{                    title: 'Register',
iconCls: 'add',
xtype: 'formpanel',
url: 'contact.php',
layout: 'vbox',
scrollable: true,



items: [
{
xtype: 'fieldset',
title: 'Opt In',
instructions: 'Want more info on Monster Energy? Opt-in to receive updates. ',

items: [
{
xtype: 'textfield',
label: 'First Name',
name: 'fname',
},
{
xtype: 'textfield',
label: 'Last Name',
name: 'lname',
},
{
xtype: 'emailfield',
label: 'Email',
name: 'email',
},
{
xtype: 'numberfield',
label: 'Phone',
name: 'phone',
}
]
},
{
xtype: 'button',
text: 'Send',
ui: 'confirm',
handler: function() {
this.up('formpanel').submit();
}
}
]
}

联系人.php

<?phpinclude_once "config.php";
mysql_connect($dbhost, $dbuser, $dbpasswd);
mysql_select_db($dbname) or die ("Cannot select db" . mysql_error());
session_start();


//***** Get today's date
$today = date("Y-m-d H:i:s");
$date = date("Y-m-d");


$firstName = addslashes($_POST['fname']);
$lastName = addslashes($_POST['lname']);
$email = $_POST['email'];
$phone = $_POST['phone'];


$sql = "INSERT INTO customer_31
(mb_firstName,
mb_lastName,
mb_phone,
mb_email,
mb_date_entered)
VALUES
('$firstName',
'$lastName',
'$phone',
'$email')";




header("location:index.php");
exit();

?>

最佳答案

您需要从 php 中的 INSERT 语句中删除 mb_date_entered

关于extjs - 在 Sencha Touch 2 中提交表单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9843046/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com