Questions tagged as 'php'

2
answers

Return values from an array after a given key

I have an array with about 100 positions this way: [ { "1":{ "id":1262, "nome":"Fulano", "sobrenome":"de Tal" } }, { "2":{ "id":1263, "nome":"Beltrano", "sobrenome":...
asked by 10.06.2014 / 17:16
1
answer

Good practices for growing class

Complementing a question that I posted here for some time, about a system for registering users using SOLID standard concepts, one of the problem I came across was the question of the User class being very large and can be very variable, one O...
asked by 01.10.2018 / 20:18
1
answer

Changing the color of the td without updating the page with ajax

How to solve this problem, I saw that there are solutions in ajax but I could not develop, what I need is to change the color of the td of a table without having to refresh the page , the color change of the td should happ...
asked by 05.06.2014 / 02:59
1
answer

How to create records in the MYSQL table according to the value of the variable $ nregistros PHP

I have a $ nregistry variable that defines the value of records to insert into the "forms" table. If $ nregisters is equal to 4 for example, it should enter 4 rows as follows: formularios id|campo 6 | 1 7 | 2 8 | 3 9 | 4 The field "id" i...
asked by 02.10.2018 / 21:04
1
answer

What is the storage difference between session, cookies and localstorage? [duplicate]

Where is the storage location for each of them? the local storage I heard that it is html5 and is better than session and cookie , what is the difference between them?     
asked by 29.09.2018 / 20:09
1
answer

bank insert with relationship N: M [duplicate]

I need to insert users into my database the MySQL data already with the N:M relationship, but I do not know how to do that. Migrate: Schema::create('usuarios', function (Blueprint $table) { $table->increments('id'...
asked by 08.02.2018 / 15:44
1
answer

save time in the Postgresql database

In the application I inform the start and end time of the activity, and save this information in the database. Follow Query: $status = $_GET['status']; $intervalo = $_GET['intervalo']; $dataini = $_GET['horainicio']."<br>"; $horainici...
asked by 15.06.2018 / 17:56
1
answer

Error using FuelPhp in version 7

I would like to know if anyone has encountered a similar error when using the FuelPHP framework, in version 1.7 with PHP 7. You are bursting the following message before entering the application: Fatal error: Uncaught Error: Call to undef...
asked by 19.06.2018 / 23:57
2
answers

input declare is not accessible in javascrit and php

I created a form and I'm trying to get the data from a radio button, and an input, but I'm not able to access them via POST in php or javascript in which I'm using a function to disable fields Html <form name="cdUsuario" class="cadastroU...
asked by 15.06.2018 / 03:17
2
answers

Generate a search url?

I need to get the url to search for a specific term on a website built using CodeIgniter. But when I type the term, the url changes only to: nomedosite.com.br/busca I tried to add ?q=arquitetura but it did not work.     
asked by 02.07.2014 / 14:05