Questions tagged as 'php'

1
answer

Why does PHP allow you to "declare" $ this with extract?

I was doing some tests (joking) with the function extract and compact of PHP. I was seeing how these two functions behaved with the $this variable. Then I performed the following tests: I tried to get the value: var_...
asked by 10.06.2016 / 20:29
1
answer

Upload form_dropdown in codeigniter

No controller I have this method : <?php class Projetos extends CI_Controller { public function index() { $data['dados_clientes'] = $this->clientes_model->get_clientes(); $data['main_view'] = 'projetos/index';...
asked by 13.06.2016 / 03:18
0
answers

Filter Products by Category in Opencart

I have code in Opencart , it randomly displays the products in the store. I would like to modify this code to display the products of a specific category through id or in the best way. The original code where I believe the modification can b...
asked by 09.06.2016 / 15:41
1
answer

Inheritance PHP and Doctrine: Duplicate definition of column

Good afternoon. The following error is occurring: Error: Duplicate definition of column 'num_user' on entity 'User' in a field or discriminator column mapping. My User class extends from OwnGroup. Then the User Class mapping is as f...
asked by 26.07.2016 / 21:49
1
answer

PHP Find directory telling part of directory name

Hello I already have an application prototype running in PHP, where I access photos from a certain directory. However, the directories were not very user friendly, for example: 2016/783/01/2016-07-26-00001 To get a little more friendly,...
asked by 26.07.2016 / 18:58
0
answers

Write data to the bank [closed]

Hello, I have a function in javascript that adds fields to my form. And I want to save the values of these fields in my database. The field code is these. <div><input type="radio" name="opcao2" value="Mae"/><label>...
asked by 14.01.2016 / 13:46
2
answers

Why do you say that using @ atus to suppress errors is a bad practice?

In PHP, we can suppress errors by using arroba before certain expressions. This can be seen at: # I've seen some hangouts on PHP and staff were criticizing the use of @ in PHP, for the thesis that an error should be han...
asked by 03.09.2015 / 17:17
2
answers

How to send email to several people with PHPMailer?

I would like to know how to make the "to:" in the email correspond to the field in the table, that is, that for example I have two emails, one email is [email protected] and the other email from the bank is [email protected] ,...
asked by 25.12.2015 / 05:25
3
answers

Relate Categories with Subcategories from the same table to another table

Relate Subcategory Categories from the same table to another table I have the following tables: Sofar,Ithinkthemodelingisok,right?ThenintheresultIwouldliketosearchforthefollowingfields:id_manual|titulo|arquivo|downloads|id_categoria|id_su...
asked by 20.05.2016 / 23:41
2
answers

How do you send 3 Curl requests at once?

I'm trying to create a system, but I have a question, I wanted to send the request all at once through curl_init, I want to send it to fetch 3 servers at a time.     
asked by 20.05.2016 / 19:23