All Questions

2
answers

Is it possible to instantiate a class without storing it in a variable?

I usually do this: $a = new MinhaClass($Parametro); Can you do this without creating the $a variable? Only with new ?     
asked on 31.12.2017 / 15:39
3
answers

createElement () method in PHP

In javascript, I can do: var span = document.createElement('span'); span.innerHTML = 'foo'; span.className = 'bar'; Is there something similar so that I can create a ElementNode in PHP, at least with the basic attributes (name, class...
asked on 23.01.2014 / 00:23
1
answer

How to get around the page expiration?

My problem is this: The user logs in, the data is sent to the requests page (which lists all of the person's requests in summary form). This page verifies if the login is valid. If it is, the rest of the page is displayed, if not, it returns...
asked on 14.02.2014 / 13:29
7
answers

How to send email automatically?

How to automatically send emails using PHP? I have a form that receives several dates and when there is 10 days to finish the deadline, a message is sent to several people with the warning. I've been told to use the Cron job . But this is...
asked on 30.01.2014 / 16:48
2
answers

Removing repeated values

I have two vectors , each with (x, y) coordinates. I need to invert the second vector , getting with (y, x) and merge with the first, but I can not get repetition in the first field, so I thought I'd use a set . However, I need the second...
asked on 15.03.2014 / 15:43
2
answers

Static list with search using JavaScript instead of PHP

In my work, I created pages as a static phone book to make it easier to search for them, but since there are many names, I would like to create a search field, but it is not possible to do this without dynamic code and database. Is it possible t...
asked on 08.03.2014 / 13:01
2
answers

Query MySQL in PHP only works locally

It's as follows: the system I'm servicing was using two query types (do not ask me why) and locally (localhost) work perfectly. When I uploaded the project to the server, the queries declared like this: <?php $sql = mysql_query("INSERT INTO...
asked on 11.02.2014 / 18:21
2
answers

How to get 2 PHP arrays and join in 1 string

I have 2 arrays in PHP that come from a form $_POST['qtd'] and $_POST['ing'] : array(2) { [0]=> string(1) "1" [1]=> string(1) "2" } array(2) { [0]=> string(1) "a" [1]=> string(1) "b" } How can you put them togethe...
asked on 10.09.2018 / 21:42
3
answers

How to remove duplicate values from a multidimensional array in javascript?

Good evening, I need to remove duplicate results in an array with other nested arrays. I have the following variable: var dados = [ ['maria', 'telefone', '324-5678', true], ['maria', 'telefone', '91234-5555', true], ['maria', 'tel...
asked on 21.05.2018 / 04:57
2
answers

@ CSS font-face installs the font on the computer or just uses it on the website?

I was told that when I use @ font-face on a page and someone accesses it, the operating system downloads and installs the font. I happened to notice the following: when creating a file with @ font-face and access, the font appears correctly,...
asked on 31.03.2014 / 02:25