Questions tagged as 'php'

1
answer

How to convert array keys to all uppercase or lowercase?

I'm getting data from a Webservice , through a response in JSON. Convert this data from JSON to array , via json_decode . But one thing that's bothering me is the fact that the keys are coming with the name in CamelCase....
asked by 23.08.2016 / 15:41
1
answer

Is there any risk in using mysqli_insert_id?

Let's suppose a website with a relatively high flow rate. A user X inserts a record into the database at the same time as another user Y inserts another record. Considering that the procedure of this insertion of user data X and user Y is:...
asked by 09.07.2016 / 18:25
2
answers

Transform multidimensional array into one-dimensional

How to turn this array into PHP: array:6 [ 0 => array:1 [ "EF1A" => "00001" ] 1 => array:1 [ "EF2A" => "00001" ] 2 => array:1 [ "EF3A" => "00003" ] 3 => ar...
asked by 05.08.2016 / 16:19
2
answers

PHP Current Usage Days / Days Missing [duplicate]

I would like to know if you have a specific function or how to do it on the current working day, for example, today is the 26th day ie the 18th working day of the month and so it goes and as the month changes it starts again at zero and goes c...
asked by 26.07.2016 / 13:41
1
answer

How to return a file in an input type file field?

I have an html form that uploads a file and I can save it to a folder. The problem is that now I need to do the reverse operation, and return the file in that same field of type input type file so that the user can edit. Someone can give me a ha...
asked by 03.02.2015 / 11:29
1
answer

Transcription javascript calculations for PHP

How can I transcribe this code into javascript for PHP? var temp = "<div class='brick' style='width:{width}px;'><img src='i/photo/{index}.jpg' width='100%'></div>"; var w = 1, h = 1, html = '', limitItem = 49; for (var i = 0...
asked by 15.12.2014 / 03:49
2
answers

Data entry validation allowing HTML TAG

I need to do a validation, always valid on the client side / JS and server / PHP, and allow the user to enter some TAGs for formatting the final result, any tips on how to do this? Is it better to use a field of type textarea or use an ed...
asked by 01.12.2014 / 14:25
2
answers

How to send two values per parameter with a single selected option? PHP

I need to send two values per parameter to another page, but the value field of the select tag only sends a ... How could I send two? Follow the code: <option value="<?php echo $data->format("d/m/Y"); ?>"> <?php ech...
asked by 01.12.2014 / 23:17
1
answer

Template Layout and Routes

I'm working on a system that uses MVC as follows, View -> HTML,CSS Model -> PHP Controller -> JS Basically, all system actions work in the following order: User triggers some action in js it valida...
asked by 17.09.2015 / 21:59
1
answer

Registration form php WITHOUT database

I'm learning php and I need to create a form using only html, jquery, ajax and php without making use of the database. Inherent data should appear in a table below the form I was instructed to do using session, however, I do not know how to do t...
asked by 24.09.2015 / 17:37