-1
I have a page with a form where is inserted name, project, etc... only when I click the form Submit in Firefox or IE does not work, But in Chrome works normally.
OBS:
1- I had an old bank. When I change to this old address Insert works in both browsers.
2- I have another page that updates the data and works normally for all browsers, the problem is only the insertion of data using IE and Firefox.
3-I’m using a library for db php mysql: https://github.com/joshcam/PHP-MySQLi-Database-Class
The problem would be in the code, in the bank or in the browser?
EDIT: Code:
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>
To help you better, post your code in the post.
– Alisson Acioli
@Alissonacioli I edited with part of the code
– Gustavo
Gives some SQL error?
– fernandoandrade
@fernandoandrade no error
– Gustavo