Questions tagged as 'php'

4
answers

Does not write records to my database

I created a registration system, but when I click the register button the message "Could not insert record:" ... Someone can identify this error, because I have not been able to identify it yet. Follow my code below. cadastro.php <!DOC...
asked by 13.05.2015 / 12:55
2
answers

Calling a file at every TimThumb run

I use TimThumb to upload and resize images. However, at the end of the project, making changes to the .htaccess for optimization (activating gzip, minify, leverage browser caching and more), something that I considered error persisted:...
asked by 13.02.2014 / 09:03
2
answers

Put directory path in a php variable

I have the following code <?PHP $directory = "placas"; //Get each file and add its details to two arrays $results = array(); $handler = opendir($directory); while ($file = readdir($handler)) { if ($file != '.' && $file != '..' &...
asked by 19.10.2017 / 17:44
3
answers

Variable in PHP read by all clients

Hello, I want to have a control variable where the value of it is read by all clients and thus prevent the same function from being executed by each client that enters the site. Example, I have a page that updates the database with an informa...
asked by 06.05.2015 / 15:46
0
answers

Gather combined data from content with different URLs in Google Analytics

When collecting Google Analytics information for the local database, I end up consuming multiple requests for data relating to the same article on the web site. This occurred due to the evolution of the same that is also reflected in change...
asked by 16.04.2015 / 22:32
1
answer

Does not return the value of the variable [closed]

I put the code in the paste bin: link foreach ($linhas as $novalinha){ $novoTituloSlug = get_string_between($novalinha, 'id="', '">'); echo $novoTituloSlug; $novalinhas = $novalinhas . "<link>http://localhost/site/"...
asked by 28.04.2015 / 21:35
2
answers

Tips for transforming procedural code into object-oriented? [closed]

I have a system that is completely procedural in style, and I want to know what points I need to identify in order to turn this code into an object-oriented one.     
asked by 12.06.2014 / 16:52
3
answers

Pass checkbox list to php

How can I pass a php page to a selected checkbox list, I have this that shows me the checkboxes, but I'm having trouble sending them to php. function SelecionaChecks() { var Check = document.getElementsByName("check");...
asked by 02.06.2014 / 22:38
2
answers

How to make a database connection using the Singleton project pattern

Well I do a lot of web applications, where all of them I use database, and every time I go to do a new project, I create a file responsible for doing the queries with the database (CRUD). I just want to change this, I want to make a file wher...
asked by 07.08.2014 / 17:41
4
answers

Search date 7 days before the current date php

In PHP I wanted to fetch the first day and the last day of the last 7 days. I have the current date: $data_actula = date("Y-m-d"); Now I want to go get the dates 7 days ago. For example, today is 2014-07-29, I want to find the 2014-07-22 va...
asked by 29.07.2014 / 17:46