Questions tagged as 'php'

4
answers

Create layout for PHP and .Net applications

I work in a public body and we have numerous web applications in PHP and .Net . I'm working on a standard layout so that we maintain the visual identity across all systems. Is there any way (tool / framework / API) that every develope...
asked by 29.01.2016 / 13:41
3
answers

Calling dozens of classes in a system influences noticeably on application performance?

I'm starting to work with object orientation in PHP and would like to know if the number of classes in a system can interfere with its performance, or if there were to be hundreds of classes in order to really performance could begin to be aff...
asked by 04.01.2016 / 16:18
3
answers

Error: the right syntax to use near 'add

I do not know what's happening but my code does not work it is simply not inserting data into the table <?php include "../../lib/inc_con.php"; session_start(); $mesa = $_POST['mesa']; $tamanho = $_POST['tamanho']; $quantidade = $_POST['qtd'...
asked by 30.10.2015 / 05:45
2
answers

Submit multiple forms with AJAX, one at a time

I have a code that I get with PHP registered students in my bank, and I make a for it to have 1 form for each student. Each form has its button submit, which takes you to the AJAX function to serialize form. This is my form's tag (which is wi...
asked by 08.01.2016 / 17:28
2
answers

Prohibit duplicate emails in MySQL using PHP

My situation is as follows , I have a whole email marketing system in PHP and emails are added by .CSV file, however it is adding duplicate values and blank values. The problem is that , I have 1 table calls n_emails with 2 columns, on...
asked by 08.04.2016 / 13:47
2
answers

Capture the link of images contained in html

I have the following code: <?php $content = ' text text text text <img src="path/to/image/1">text text text text <img src="path/to/image/2"> text text text text text text text text text text text text text text text text <...
asked by 21.03.2016 / 14:32
2
answers

Problem with UTF-8 [duplicate]

Good. I'm doing a project, and I have several accents in my text. I already joined: <meta charset="utf-8"/> in my code and still did nothing and I do not understand why ... Any help ??       
asked by 06.01.2017 / 11:59
4
answers

Calculate date difference and start these days

I would like to calculate the difference of two dates and print all dates between them, for example: $data_inicio = new DateTime("08-02-2018"); $data_fim = new DateTime("10-03-2018"); ($dateInterval = $data_inicio->diff($data_fim); echo $da...
asked by 21.03.2018 / 13:12
2
answers

Does the DateTime class of PHP support date creation in the Brazilian format?

In the following code echo will be printing +273 days, but would not it be +9 days ? $datetime1 = new DateTime('01/04/2018'); $datetime2 = new DateTime('10/04/2018'); $interval = $datetime1->diff($datetime2); echo $interval->format('%...
asked by 06.04.2018 / 20:57
3
answers

Instantiation of objects in php

I have some difficulties in instantiating objects in php. I have the code in OO: class Usuario { private $idade; private $nome; public function getNome() { return $this->nome; } public function...
asked by 20.09.2016 / 21:22