我有一个页面,其中包含插入名称,项目等的表单...当我点击提交表单时,Firefox或IE无法正常工作,但Chrome可以正常工作。
OBS:
1-我有一个旧的DB。当我将其更改为旧的DB地址时,插件可在两个浏览器中使用。
2-我有另一个页面更新数据并适用于所有浏览器,问题是只使用IE和Firefox插入数据。
3-我正在使用db php mysql的库:https://github.com/joshcam/PHP-MySQLi-Database-Class
问题出在代码,数据库或浏览器中吗?
function action_adddb () {
global $db;
$data = Array(
'prname' => $_POST['prname'],
'members' => $_POST['members']
);
$id = $db->insert ('users', $data);
header ("Location: page_insert.php");
exit;
}
$db = new Mysqlidb ('nomedohost', 'username', 'senha', 'nomedobanco');
if ($_GET) {
$f = "action_".$_GET['action'];
if (function_exists ($f)) {
$f();
}
}
<form name ="form1" class=" form-horizontal" action='page_insert.php?action=<?php echo $action?>' method=post>
<input type=hidden name='id' value='<?php echo $data['id']?>'>
<input class="form-control" type=text name='prname' required placeholder='Project Name' value="<?php echo $data['prname']?>">
<input class="form-control" type=text name='members' required placeholder='Members (First and Middle name)' value='<?php echo $data['members']?>'>
<input id="submit" name="submit" type="submit" value="Create" class="btn btn-primary text-center btn-block">
</form>