Questions tagged as 'mysqli'

2
answers

Days elapsed between php dates

hello friends I am programmed a system in which they ask me to show the days elapsed between two dates with Y-m-d format that would be the current date - the date on which the entry was made to the bd and I found the problem I do not calc...
asked by 30.06.2017 / 20:11
2
answers

Download file from mysql server

Good companions, I have a problem in my code and I can not fix it ... I'm trying to upload files and download them with php, the problem is that when I give it to download it leaves the page blank and does not download anything .. this is...
asked by 19.04.2017 / 21:52
2
answers

Protect access to files on my system (php)

Implement a session system to protect my php files, I include it in every php file that shows a menu. <?php // CONECTANDO AL SISTEMA SEGUN TIPO DE USUARIO// if (isset($_SESSION['conectado']) && $_SESSION['conectado'] == true &...
asked by 22.03.2017 / 19:57
1
answer

Session_Start error

I was copying to a PC that I have, an old system import your database and I went to try it (this is called base_projecto ) it happened that the database had another name different from the one I had put it, change it in connection. (He told me...
asked by 17.02.2017 / 19:13
2
answers

Warning: mysqli_query (): Empty query - PHP MySQL

I have a table where I show all the cabins that I have in my database. Each one of them will have its ID, its file to modify (data of each cabin) and a "checkbox" button to be able to select those that they want to eliminate. 1) When I select...
asked by 28.11.2017 / 22:54
1
answer

Is it possible to import a sql script and split the queries?

I'm looking to create a database from a one-button event, the problem is that the way I'm doing it at the moment, is to take each query, add it manually and execute it, all right up there. The problem is that every time there is a change in the...
asked by 22.09.2016 / 16:57
1
answer

Create a trigger to execute it before insert

I want to do a Trigger in MySQL that does the following: Background: I have a table called x with 3 columns: id (int), name (varchar) and state (enum). There can only be 1 record with the status Yes (column type enum; Yes, No) When insert...
asked by 03.06.2016 / 23:37
1
answer

Save orders in database

I have a cart and I am working on the button to confirm the purchase. The products arrive to the cart by means of a while, and I keep the data I need from each article in variables. The problem is that when doing the submit only print the values...
asked by 02.12.2018 / 16:10
1
answer

How to concatenate two fields?

You will see this code is an autocomplete that works with PHP and JQuery and a bit of Ajax. It works, because I write names and I get the names of the database. But what I also need is that they help me to concatenate the name and the surname. S...
asked by 29.08.2016 / 01:50
1
answer

Upload only videos to the server with Php and Mysql

Currently I want to upload only videos to the server validating from php: This is what I currently carry: <?php session_start(); require'funcs/conexion.php'; if(!isset($_SESSION["id_usuario"])){ header("Location: index.php"); } ?>...
asked by 13.12.2018 / 22:00