Questions tagged as 'mysqli'

1
answer

Get field in table with Mysqli

I'm trying to create a comparison in my code to verify that the password you entered is the same as the one you entered. I used it as follows; function confirmaPedido ($conexao, $numeroPedido, $senha) { $querySenha = mysqli_query($conexao,...
asked by 27.03.2015 / 14:42
2
answers

Connect form with database

I have Database called form, and a unique table n_acordos. I need to display form information in a table. Not able to connect to database. <?php $conn = mysqli_connect("localhost","root","","formulario"); $sql = 'SELECT * FROM formular...
asked by 05.12.2018 / 12:10
1
answer

Making a page accessible only to users with a certain level

Good morning, I have a login system with php and mysql, in the database I have 2 users, one has Admin level (0) and the other Master (1), I have the login page that asks Username and The person's password and checks if the inserted data hits the...
asked by 04.10.2018 / 01:08
3
answers

Ajax PHP Query Return

How do I get the PHP query values in AJAX? AJAX $.ajax({ type: 'post', dataType: 'json', url: 'listaGabaritosSelecionados.php', success: function(url){ $('.retorno').html(url); } }); PHP $mysqli = new mysqli("l...
asked by 11.09.2018 / 13:12
2
answers

"Illegal string offset" error when calling usort in bank data

I am trying to sort the result by a specific column of an array of bank data. function cmp($a, $b) { return strcmp($a['usu_codigo'], $b['usu_codigo']); }; usort($usu_info_coluna, "cmp"); Giving var_dump to $usu_info_Coluna...
asked by 25.10.2018 / 14:54
1
answer

Sort query by relevance MYSQLi

How could you make the query below sorted by relevance and then by date? $query = $mysqli->prepare( "SELECT 'id', 'titulo', 'foto', 'descricao', 'slug', 'data', '' as 'local' FROM 'noticias' WHERE MATCH ('titulo', 'descricao') AGAINST (?) U...
asked by 12.09.2018 / 16:38
1
answer

Php Post Approval System

I'm creating a medium post approval system in "Gambiarra", what I did is, when the user posts, it gets value '0' in the 'Status' table in the database. So I have a restricted page for the site's adm, on this page I have a loop that displays th...
asked by 15.10.2018 / 16:03
1
answer

calculation with DB data, bring service, value and total

I need to save cliente, serviço, valor of a service. The first problem is to be able to return the total value (the sum of the services) My form so far is thus; <form action="valortotal.php" method="post"> <div clas...
asked by 01.11.2018 / 05:50
2
answers

Form validation error

What I need to do is when the email is not valid because of the alert in javascript I wanted to show a message over the form in question that showed that the email was invalid! HTML CODE       <input type="email" class="form-...
asked by 24.05.2018 / 18:29
1
answer

Connection class mysqli in php and SELECT [duplicate]

The connection code with the database that I have mounted is working, but when I use a SELECT, an error appears and I could not resolve it. <?php define('DB_NAME', 'projetoxyz'); define('DB_USER', 'root'); define('DB_PASSWORD', ''); defin...
asked by 31.05.2018 / 17:01