Questions tagged as 'php'

2
answers

Validating a field of type input in function of a select

I am working with Codeigniter / Bootstrap and need to validate one field of my form depending on another. I have a select field named Contract, with two possible options (Yes or No) and another input type field called ContractDate. I need that w...
asked by 19.09.2016 / 19:05
1
answer

Search for Array () in the variable and database

I have the following fields in Array (): # Tratamento das variaveis para substituição da mensagem $campos = array( 0 => '#celular', 1 => '#ddd', 2 => '#cpf_cnpj', 3 => '#nome_razaosocial', 4 => '#mensagem',...
asked by 28.10.2016 / 14:24
1
answer

Graph facebook with comment counter does not work anymore

I created a function in PHP that added the number of comments made on facebook and wordpress to show in each post, but I think because of facebook plugin updates, the code no longer works. I've tried to create a new app on facebook to use the...
asked by 25.10.2016 / 05:03
1
answer

Move multiple .xml files to another PHP directory

Current Directory Xmls / various files here ... I want to pass all files from within Xmls to Xmls / XmlsLidos I tried to do with copy and then use unlink , but it did not work.     
asked by 08.09.2016 / 20:35
2
answers

Adding information to a file on a specified line

I'm using file_put_contents to create a file, but in a certain part of my process I need to add things to this file but only from line 2, I searched the PHP documentation for file_put_contents and found nothing , can anyone help me...
asked by 29.08.2016 / 19:24
2
answers

How to turn this Curl / PUT command into php?

How do I transpose this curl code to send it in a PHP file? curl -X PUT -H "Content-Type: application/json" -H "Accept: application/json" -d { "status":"paused" } https://api.mercadolibre.com/items/ITEM_ID?access_token=YOUR_ACCESS_TOKEN    ...
asked by 07.09.2016 / 22:59
1
answer

Compare two strings and show difference between them

I accidentally clicked a post around here that was edited and I saw that StackOverflow showed the edit differences. Soon, a lamp shone over my head and now that I'm dealing with a CVT project, I thought of an audit feature of the generated fil...
asked by 03.08.2016 / 03:11
1
answer

Changing the content of Modal Laravel 5.1

I have a Grid with the edit button when I click on it it accesses the Controller and brings the data of a certain user into a Modal. But it's just bringing in the first user I click. Follow the code: Grid Link <a href=".../show/{...
asked by 01.08.2016 / 21:52
2
answers

PHP - Get different database data from the same button

Well the problem is this: I have the following code HTML/PHP which allows me to go fetch the last four data entered in the database in order to show the last ones added: $getLastFour = mysqli_query($dbc,"Select * From products Order By...
asked by 27.09.2016 / 04:03
1
answer

Preg_match_all, get the values of the attributes name of the inputs

I'm doing a project with dynamic forms, that is, the user (administrator) can make their own form (HTML / CSS), but when I go to get the form to the database I need to check if the names ( name ) of inputs match the names of the com...
asked by 22.09.2016 / 19:15