Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/280.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Codeigniter值未以引导模式中提交的形式从视图传递到控制器_Php_Forms_Twitter Bootstrap_Codeigniter - Fatal编程技术网

Php Codeigniter值未以引导模式中提交的形式从视图传递到控制器

Php Codeigniter值未以引导模式中提交的形式从视图传递到控制器,php,forms,twitter-bootstrap,codeigniter,Php,Forms,Twitter Bootstrap,Codeigniter,我有一个视图,其中单击链接时会显示引导模式。我在这个模式中放置了一个表单提交。引导模式中的字段是通过javascript填充的。我的问题是,当我提交表单时,我没有在控制器中获取POST中的值。我找不到哪里出了错 这是我的密码: 视图: 功能显示模式(内部TT、indusid、设备名称、设备制造、优先级) { var complaintid=内部TT; document.getElementById(“NHIDenEvent”).value=complaintid; document.getEl

我有一个视图,其中单击链接时会显示引导模式。我在这个模式中放置了一个表单提交。引导模式中的字段是通过javascript填充的。我的问题是,当我提交表单时,我没有在控制器中获取POST中的值。我找不到哪里出了错

这是我的密码:

视图:


功能显示模式(内部TT、indusid、设备名称、设备制造、优先级)
{
var complaintid=内部TT;
document.getElementById(“NHIDenEvent”).value=complaintid;
document.getElementById(“NinternAlt”).value=complaintid;
document.getElementById(“nindusid”).value=indusid;
document.getElementById(“错误”).value=eqptname;
document.getElementById(“faultymake”).value=eqptmake;
document.getElementById(“优先级”).value=优先级;
$('responsiveshow').modal('show');
}
TT号
印度河
日期
抱怨
TT号
印度河TT号
印度河
故障设备
故障设备制造
优先事项
关
控制器:

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Complaints extends CI_Controller {

function __construct()
{
parent::__construct();

$this->load->model('complaints_model');
$this->load->helper(array('form', 'url'));
$this->load->library('form_validation');
}

public function registerindus()
{
$internaltt=$this->input->post('ninternaltt'); //here m not getting the values from view
$industt=$this->input->post('nindustt'); //here m not getting the values from view
$eturn=$this->complaints_model->updateIndusTT($internaltt,$industt);
if($return)
{
$this->index(); 
}
else
{
$this->listunregistered();
}
}   
}
更改

<?php echo form_open("index.php/complaints/registerindus"); ?>
还可以通过在控制器函数中回显post值来调试代码

然后这里有个打字错误

$eturn=$this->complaints_model->updateIndusTT($internaltt,$industt);
应该是

$return=$this->complaints_model->updateIndusTT($internaltt,$industt);

您是否收到任何错误?请签出表单操作路径,对路由使用site_url(),并检查
$eturn=
if($return)
在您的控制器中。我没有收到任何错误。当我将
更改为
时,我收到一个错误:
未找到此服务器上未找到请求的URL。
然后尝试先删除index.php
<form method="post" accept-charset="utf-8" action="http:/example.com/index.php/email/send" />
$eturn=$this->complaints_model->updateIndusTT($internaltt,$industt);
$return=$this->complaints_model->updateIndusTT($internaltt,$industt);