Questions tagged as 'php'

1
answer

Upload image to server and get your route

I explain the idea and then the situation in which I find myself.    The idea is to upload the image obtained through the html form by calling the php on the server, and then (or depending on how you look at it) obtain the path of the image p...
asked by 21.03.2016 / 14:27
1
answer

Access to databases with Zend Framework 2 in the model

I wanted to ask about accessing databases using Zend Framework 2. I am familiar with the use of ServiceManager and how the configuration is done in global.php , Module.php to access the database from the controller. My...
asked by 06.04.2016 / 14:47
3
answers

Problems saving PHP date

I have a project on the web and I am trying to save the complete date in the database but it is giving me a strange error, I do not understand what the error is. Note: Recently everything was going well because in my database in the field w...
asked by 19.12.2018 / 17:42
2
answers

Send multidimensional array from PHP to jQuery (ajax?)

If I have an array in php: $items = array( "nombtre" => "botella"; "precio" => "1"; "descripccion" = "Botella de cristal" ); How can I send it to jquery? to use all the index of it?     
asked by 19.01.2017 / 08:41
3
answers

Duplicate record with new ID and another custom field

I have a database ( basedatos ) and a table ( contratos ) with the following fields: Id Nombre Fecha (timestamp) Vendedor Telefono Gestionado I want to insert in a php page a button that duplicates the record but with the conse...
asked by 09.06.2017 / 08:13
2
answers

Unable to remove a space in java

Good morning, I'm trying to remove a space with java. The value I get through scraping, for example the value 11 990,00 . I've tried with: .replace(" ", "") .replace("\S", "") .replace(" ", "z").replace("z",...
asked by 26.04.2017 / 10:58
1
answer

Warning: mysqli_fetch_assoc () expects parameter 1 to be mysqli_result, boolean given

I have a problem with the following code to print the contents of a database: $k = $_POST['key']; $consulta = 'SELECT * FROM ltr WHERE letter_key= $k'; $ejecutar= $conexion->query($consulta); while ($row = mysqli_fetch_assoc($ejecutar)) {...
asked by 01.08.2017 / 11:47
5
answers

get the age from the date of birth with javascript and php

Hi, I am working on a form in php where I have the data of a person and I want to put the date of birth in dd / mm / yyyy format I automatically calculate the age and put it in the age field. Can this be done with javascript?     
asked by 02.11.2016 / 18:24
1
answer

Doubt with ternary operator

I have doubts how to interpret this: $page = (isset($_REQUEST['page']) && !empty($_REQUEST['page']))?$_REQUEST['page']:1; Do you mean that if page is not declared and it is not empty, it will pick up the page value and otherwise...
asked by 06.11.2018 / 12:23
1
answer

Delete files by extension in laravel 5.5

I'm trying to delete all the files in a folder that have the extension .jpg is possible using Storage :: delete ('file.jpg');     
asked by 20.11.2017 / 17:55