Questions tagged as 'php'

2
answers

Validating CPF and CNPJ with function php

I have two functions, being valida_cpf checking cpf and valida_cnpj checking cnp. Well both work perfectly, but I wanted to know if it's possible to merge the two, ie create a single function called valida_cpf_cnpj . Co...
asked by 04.07.2016 / 15:24
1
answer

Checking the data type received in POST in PHP

I need to find out what kind of data I am getting in a user's post. The user can provide me the data in XML format, JSON HTML and text Content-Type = text / xml / json / text / html Accept = application / json / xml / text / html     
asked by 07.07.2016 / 15:01
1
answer

Doubt with access level and login in PHP

Well I have a question and wanted the opinion of more experienced people. I have a system in PHP that uses Mysql. I have a table called 'access' where saved the options that the user has to access the system. The problem is that every time I...
asked by 19.12.2016 / 23:13
1
answer

Send variable to Command from Controller Laravel

Today I call command through controler perfectly, but I'd like to send variables too. In controller , I call command like this: \Artisan::call('syncustomer:sav'); The name attribute of the current command: prote...
asked by 27.12.2016 / 15:38
1
answer

I have problems with this form to pass the data through PHP, but I can not get the error

I have this form within a bootstrap modal; <form action="form_handler.php" method="get" name="precioUpdate"> <div class="col-xs-6"> <label for="venbras_actual_venta" class="col-xs-12 form-control-label">Precio actual de...
asked by 31.12.2016 / 16:50
2
answers

Set click event to an element that was inserted via AJAX after page load

I'm developing an instant search system with jQuery, Ajax and PHP. I created a navigation system for the keyboard arrows in the resulting search options. It's running smoothly. But what I want to do is that when the 'enter' keypad is pressed on...
asked by 26.04.2016 / 20:38
1
answer

Version of laravel project 5.1

I do a project in Laravel 5.1 and I use XAMPP and all the settings like this local database, (home computer) etc. But I pushed push ) to Github this project only when I go on the work PC I clone the project and it does not work logically. Wh...
asked by 25.04.2016 / 14:50
3
answers

What is the best way to pass JSON per parameter in Angular JS?

I'm developing a system using angular js and php. The user enters his cpf and his password in a form, remembering that this user is registered in the database with his information, like, address, name, etc. When user enter his credentials, I get...
asked by 18.04.2016 / 21:24
2
answers

Upload Multiplo CodeIgniter

I have a form to upload multiple images using codeigniter: <input type="file" name="files[]" id="filer_input2" multiple> And PHP: #configuracoes base $config['upload_path'] = $diretorio; $config['allowed_types'] = 'gif|jpg|jpeg|png|...
asked by 27.04.2016 / 15:46
2
answers

Pass variable from AJAX to php

I do not have much experience in Ajax, I needed some help. It's the following, I have a form that validates the information with ajax. Now I wanted to insert this data into the database, how can I insert the username variable into the database,...
asked by 12.04.2016 / 19:45