Questions tagged as 'php'

1
answer

Is it correct to create a class with static methods to connect to a MySQL database?

I am starting to learn php and MySQL and I have the doubt of whether it is right to create a class with static methods for the connection. The class that I created is this: class ConexionBD { private static $conexionBD; public sta...
asked by 11.04.2018 / 00:36
1
answer

Put a query in text boxes

I'm doing a window to edit data in phpmyadmin and I want to put the information in text boxes, but I have not found a way to insert it without being a placeholder. And what I need is for it to look as if the user had inserted it. <...
asked by 12.04.2018 / 00:44
2
answers

Center html table

Good I have these tables generated in pdf by php in html , and I would like to center them, but I do not get it. I attach the code: $content .= ' <div class="row" > <div class="col-md-12">...
asked by 18.04.2018 / 09:28
2
answers

How to make an input yield a specific result

Good I am making a table and it throws the results to me in table form but I occupy that it throws to me now the result that I enter in the input if I put for example 5x14 that throws me only that and I do not throw all the tables I do not know...
asked by 10.04.2018 / 16:12
1
answer

Error in PHP: Array to string conversion in

I get this error, they could help me    Notice: Array to string conversion in   C: \ xampp \ htdocs \ EPWeb \ Admin \ Control \ ControlUsuario.php on line 14 This is the code: function IngresarUsuario($nombreusuario,$apellidousuario,$na...
asked by 04.06.2018 / 17:31
1
answer

Accents with mysql and php

I am making an application and my goal is that from the form you enter the data with accents and ñ, and that in the BD are stored the same. It turns out that when executing the following query through PHP with PDO (from the backend of the app...
asked by 24.03.2018 / 22:09
1
answer

Search for data from an array in a PHP array

My problem is as follows, for example, I have a matrix: ID - Name - Type 152 - item1 - type1 536 - element2 - type2 85 - element3 - type3 105 - item4 - type4 And I have a array : $busca = array(105,536,85); What I need is t...
asked by 18.05.2018 / 05:15
1
answer

PHP cycle while printing unwanted results

I am making an invoice in which I can pay 1 or several installments of the contract at the same time. Each payment is saved with the date and time it was made. For example if I pay 3 installments at the same time, all 3 have the same time and da...
asked by 11.03.2018 / 13:30
2
answers

separate string in each capital letter or number

I need to separate a string with "_" every time it finds a capital letter and transform it to lowercase. This to separate each word from the class name, for example if I have the following class: class UserNote{ } the name of that class wou...
asked by 13.03.2018 / 17:32
2
answers

Classes and functions in PHP

I'm having some problems with php classes, to be more exact, some doubts, I do not know how classes and functions work. For example, if you wanted to create an object called an image, that has 2 functions such as Upload and Delete. $imagen = n...
asked by 28.05.2018 / 00:06