Questions tagged as 'php'

1
answer

MySQL search engine

I'm trying to implement a word search in a mysql table I have a number search engine that, although very simple, works perfectly: <?php if ($row['albaran'] == $_POST['buscar']): ?> <?php endif; ?> This shows the...
asked by 19.03.2018 / 10:27
1
answer

decrypt a previously encrypted database element with mySQL

When I save a password element in my database, I save it with sha1 (...) and this is saved, for example, if I put hello , in the following way: fc1815288c56c87a05ef3cfd10738015bc5c1129 <?php $conexion=mysqli_connect('localhost','ro...
asked by 17.03.2018 / 18:30
2
answers

how can I bring the records from a database with a select / select?

This is my html code I want to bring the registration data by means of the name EditClient.php          Edit Client      Edit Client <form action="editarCliente_submit" method="get" accept-charset="utf-8"> </form>...
asked by 23.03.2018 / 13:29
2
answers

table that gives even and odd numbers

I'm making a table with Boostrap and PHP to do odd and even numbers I'm doing it in for but I do not know why it does not print odd and even. I do not know much of Boostrap with PHP . With this for...
asked by 23.03.2018 / 16:59
1
answer

Data is not inserted correctly in MySQL database

I try to insert data from a form into a database. When I fill in the form the code is executed correctly and does not give an error. I have a variable ID that auto increments and every time I execute the code a new record appears but in the othe...
asked by 23.03.2018 / 22:07
1
answer

PHP Error with array

Why this php error Notice: Undefined offset: 58 Skip that error when using the following function, more specifically on the line marked with the comment. <?php public function repeatLine($string){ $array = str_split($string)...
asked by 21.03.2018 / 21:07
1
answer

problem when getting the class name

In my code I have a method that uses get_class to get the name of the class. For example, if you had the User class, you would store that class name in a variable. I recently started using the namespace with psr-4, but now that function get_c...
asked by 21.03.2018 / 20:20
1
answer

I do not understand the operation $ sql-bind_param

I would like to understand this little code. Which I see, avoid SQL-Injection They could correct me and add information. Sorry if I mention failures <?php $mysqli = new mysqli("localhost", "root", "", "bdpersona"); $sql = $mysqli-&...
asked by 21.03.2018 / 15:42
2
answers

Bulk file import from excel.CSV Notice: Undefined offset: 1

I make a massive import form of excel.CSV, I care about all the records but when the process ends it shows me this error: Notice: Undefined offset: 1 in C: \ xampp \ htdocs \ import_excel.php on line 27 Notice: Undefined offset: 2 in C: \...
asked by 15.03.2018 / 10:52
1
answer

Display data from one database depending on values in another table

I have the following DB with user, password and if they have different OS (with a boolean for each OS): I want to create another table in which there is a news record and the OS to which they belong. A story may belong to two OS. The...
asked by 20.03.2018 / 19:16