Questions tagged as 'php'

1
answer

Function php - Working with currency values

Good evening, I'd like your help to solve a problem. Researching a little here I found a code that will help me work with a page for spending and income. I would like to make this code not round the values. when I type 0.3 cents it returns 1....
asked by 12.12.2017 / 03:16
1
answer

Uploading images larger than 2mb

I have a simple system that uploads the image to a folder and writes the name and url to the database. But when I select an image larger than 2mb of the error in the bootable destination that is equal to $ destination = folder / ".photo_name &...
asked by 18.11.2017 / 23:29
1
answer

Problems with paging in laravel

I have a page where the title of all the news on the site is listed, and it has pagination. I was asked to put a search field, to make it easier to search for a particular piece of news. I was able to do this form and the controller impl...
asked by 23.11.2017 / 19:39
1
answer

Rule PREG MATCH appropriate

I created a loop that shows all the months of the year with the following code: for($i = 1;$i <= 12;$i++){ } Then I created a $ _GET variable that would receive a rule like the following: 1,2,3,4,5,6,7,8,9,10,11,12 This is the $ _GET...
asked by 20.11.2017 / 17:27
1
answer

Variable by URL in all page links

I'm using the following code to pass variables through the URL, in wordpress. if (isset($_GET['layout'])) { $layout = $_GET['layout']; } else { $layout = '1'; } With $layout I retrieve the value in the code, where I use to ch...
asked by 19.02.2018 / 18:49
1
answer

How to return substrings in a string delimited by delimiters?

My problem is this: I have a string "Olá [eu] sou uma [string]" , how would I return the substrings that are within the delimiters "[" and "]" ? * When I say return, I mean an array like that of the function explode.     
asked by 06.11.2017 / 16:48
1
answer

Insert multiple type file records into Mysql

I'm making a form, where you have a part of registering images for a photo gallery. In this field I use a script with a add field button so that a new field can be inserted for each photo <label>Galeria de Foto</label> <...
asked by 22.05.2018 / 20:47
1
answer

Codeigniter - Retrieve ID

I need to retrieve the last ID inserted into a table and pass this ID to the field of another function. Is it possible to recover in this way? $negociacao = array( 'id' => $neg->id, 'dt_negociacao' =>...
asked by 08.11.2017 / 13:41
2
answers

HTML form values are not varying within the while PHP

Well, I made an extract that selects the data from the DB and prints it on the screen through the while, which is generating the correct values, but now I'm trying to create an edit button that opens a popup with the inputs already populated wit...
asked by 07.11.2017 / 14:38
1
answer

Upload image to server Apache2 - Ionic 3 + PHP

Based on a tutorial ( link ) I made an application to upload images on an Apache server, as described in the previous link. In the created provider I put the URI of my machine on the network running Apache2 with the file parse-upload.php (which...
asked by 16.11.2018 / 18:15