Questions tagged as 'php'

1
answer

Can not modify header? [duplicate]

How can I solve this ?, I went up my website for the first time and I get the following error messages when viewing the site. Of course, this error is not represented locally, so I will be omitting some important rule perhaps when uploading it...
asked by 07.12.2018 / 00:05
2
answers

Add 0 on the left - PHP [duplicated]

My problem is as follows: When creating a new client, I need 6 digits to be stored in the database, starting with 000001 . The problem is that when I save it, in MySQL I keep only 1 and I need you to keep all 6 digits. The fiel...
asked by 18.03.2017 / 22:14
1
answer

Error when using __construct in a child of a MySQL class (it is solved by not using __construct but I need it if or if)

I have two classes: The first is called "MySQL" and contains all the functions for the queries (in addition to the ones that the API "MySQLi" brings.) Use __construct to create the MySQLi object. The second (Users), which is the daughter of the...
asked by 04.01.2019 / 03:24
1
answer

php vulnerabilities

Is it good to query the database within the php code? For example: <? $restIds=$_SESSION['restaurants']; $restIds=substr($restIds,0,strlen($restIds)-1); $query="SELECT cli.restaurant_id as id, CONCAT(cli.nombre,' ',cli.sucursal) as nom...
asked by 28.12.2018 / 19:26
2
answers

SET statement prepared mysqli

What is the correct way to perform the following query? I have a function to which I want to assign a series, if I execute it directly in the engine it generates the div concatenated, but in the PHP it throws an error. If I decl...
asked by 09.02.2016 / 14:14
2
answers

Show Selected text Select an option

Very good and tried to put in a selected control the option "Select an option" but it does not work for me, the combo is loading data from the database, I'm using the codeigniter framework, I would like someone to guide me in it to be able to lo...
asked by 18.08.2016 / 17:39
1
answer

Heredoc in PHP returns Error: Undefined variable: using sprintf

I define the content of a variable in PHP using HEREDOC $ptrn = <<<EOF En %2$s se ha bebido %1$d cervezas! EOF; When I try to format with sprinf $ptrn = sprintf($ptrn,7,"Paco"); returns the following error...
asked by 17.08.2016 / 12:34
1
answer

Doubt with the syntax in CodeIgniter

I'm following this codigofacilito tutorial on Youtube: link I try to do the form, but it does not appear on screen, and it is due to the fact that in the video they use a syntax very different from php, which I copy but it does not work...
asked by 22.08.2016 / 22:47
2
answers

Compare a range of dates with BETWEEN in mysql

I am creating a module in a system with PHP and MySQL, where I am making an agenda for events. I have a table with the following fields: id_evento nombre_evento fechaInicial fechaFinal id_ubicacion...
asked by 19.02.2016 / 17:35
1
answer

Choose recipient's mail in a random way in contact form with php

Good evening. It is the first time that I occupy this platform to make a query, I hope you can help me. I have already created a form for a telephone company. It is assumed that the way it works is that depending on the selected city, the inf...
asked by 12.02.2016 / 04:22