Questions tagged as 'mysqli'

0
answers

How to use tags in MySQL and PHP

I'm creating a website and would like to know how I can use tags with MySQL and PHP. I have two tables: produtos and informacao . In the informacao table I have a field called related products where I will put products...
asked by 29.01.2015 / 16:14
1
answer

ENUM or Boolean?

I have a NOTICIA table and I have a column ATIVO News can be active or not if it is BOOLEAN (0 or 1) if it is ENUM . What would be best to use BOOLEAN or ENUM ?     
asked by 04.04.2018 / 22:36
2
answers

Formatting / masking CPF in MySQL or PDO

I have a "cpf" field in my table. This field can be of type INT or VARCHAR, in case I need to change it to solve my problem. In it there are only numerical values, without the dashes and without hyphen (.-). In PHP, when I'm going to call dat...
asked by 16.02.2016 / 22:58
2
answers

How to do a double "Update" in MySQL

I'm developing software in PHP / HTML / MYSQL FRONT. I need to give a Update in a table but changing two columns at one time. Here comes my doubt in the variable $ gravaprat1, since it is not executing the second command (SEND = 1). Next: $sel...
asked by 13.07.2018 / 19:07
2
answers

View how many people have accessed pdf

I have a pdf on my server and I put it available through a link, is there a way to control how many people access the pdf?     
asked by 11.03.2015 / 17:55
2
answers

Turning Number Sequence into Date with PHP and SQL

I have a database that has a numeric sequence written to a table that means a date of publication of an article. I would like to know if anyone can decipher this number sequence so I can print the correct date through PHP. For example: 14...
asked by 22.06.2016 / 16:55
1
answer

Delete Record in Bd [closed]

I created a system for post creation. But I'm not able to delete it in the bank but the confirmation of Successfully Deleted appears! <?php $db = mysqli_connect("127.0.0.1", "root", "", "photos"); $sql = "SELECT * FROM images"...
asked by 01.01.2017 / 15:31
2
answers

___ ___ verify erkimt registered user PHP Mysqli ______ qstntxt ___

Hello, I do not understand almost anything about Php and mysqli. I am trying to implement the system of users for the site, the registry is already working but I can register with the same email as many times as I want. How do I check if email already exists in BD?

So far I only have this, "index.php" form,

config.php (connects to the database);

controlindex.php (sending the values to the DB table)

%pre%     
______ azszpr166619 ___
%pre%     
______ azszpr166456 ___

Just check if a user already exists with the last email

%pre%

You should prevent SQL injection in your code, the way it is written SQL can be easily injected, has an explanation of how to prevent.

    

___

Hello, I do not understand almost anything about Php and mysqli. I am trying to implement the system of users for the site, the registry is already working but I can register with the same email as many times as I want. How do I check if email a...
asked by 19.11.2016 / 00:47
4
answers

SQL Injection via url [duplicate]

At the moment my site is like www.site.com.br/blablabla_id_ 2 to define pages. I use mysqli to search the database with this id. $id = $_GET['id']; $result = mysqli_query($con,"SELECT * FROM post WHERE id_post = '$id'"); if(mysqli_num...
asked by 07.11.2014 / 21:47
3
answers

Send POST Textarea one value per line

I have form with textarea where it will have a value per line. Example: I need to send this value to the MySQL Database. Then on another page I need to create a For to list these values. What brings me confusion is...
asked by 22.06.2015 / 14:09