Questions tagged as 'mysqli'

2
answers

Error in adding PHP + MySqli data

please help me with the error below, I'm trying to write this code data to a table but when I ask to write it is returning the error:    Fatal error: Uncaught Error: Call to undefined function d / m / Y () in   C: \ xampp \ htdocs \ PortalPib...
asked by 09.10.2018 / 20:43
1
answer

Insert text with double quotation marks in mysql database

I am using the following code to insert text with double quotes in a mysql database: mysqli_query($con, "insert into medicacaohistorico (data, unidadeori, unidadedes, itemdetalhe, qtd, solicitante, despachante) values ('".date("y-m-d")."', '"....
asked by 08.08.2018 / 14:22
2
answers

User with more than one profile

In the system business rule that I am working on, a user can have more than one profile. The profiles are: administrator, appraiser and responsible. For example: So-and-so can be both administrator and appraiser at the same time. My questi...
asked by 27.07.2018 / 04:20
2
answers

How to refresh the page without forwarding information to the database in php

I'm working on a simple messaging system, and it's up until it works, however whenever a refresh is given on the page the information from the last insert is forwarded to the database. And if nothing has been filled, and given refresh it simply...
asked by 29.06.2018 / 21:15
1
answer

Logout problem with php

I'm trying to make a simple login system to learn and improve it, I used a basic material I saw in devmedia, and the matter was already old because it still used mysql instead of mysqli for connection, in that matter did not contain logout, afte...
asked by 04.07.2018 / 22:54
1
answer

MySQL compare a number with string returns true if string starts with number

I have the following table in the database: idUser - Username - Group 1 - John - 5GR 2 - Doe - 1GR And the following query: SELECT * FROM 'table' WHERE 'idUser' = '$name' OR 'Group = '$name' $ name is the variable that conta...
asked by 24.05.2018 / 11:18
1
answer

Searching and displaying results 2 tables mysqli / php

I wanted to search 2 tables (news and photos) and then display the results of this query below. But the fields I have in each table are different and I'm not able to work out a way to display the results because of that. News table fields: Ti...
asked by 11.09.2018 / 20:46
1
answer

Question about PHP, where I can not do an exclusion with a "

So I am not able to find out about an exclusion code where it contains a condition. If it is a registered course, if it is a foreign key in the user table, it can not be excluded from the course table. I will leave the print of the tables bel...
asked by 18.03.2018 / 16:27
1
answer

Querying database using ORDER BY kills my search

My code displays a list of people and a search field at the top. everything works fine, including searching. but I need people to appear randomly. The problem is that when I use the ORDER BY rand () (or any other ORDER BY) my search stops workin...
asked by 09.06.2018 / 06:11
1
answer

How to fix this error of Undefined Variable?

I've been trying to resolve this php deal for weeks, but I've done everything and nothing works. (It is a visitor control system) Below is my code. form-visitors (html in php) .php <!DOCTYPE html> <?php include_once ("...
asked by 09.02.2018 / 12:47