Questions tagged as 'php'

1
answer

Create zip file of a folder

I have a folder named Photos, how do I create a photos.zip file with all the photos in it?     
asked by 17.06.2016 / 16:29
1
answer

PHP - Mysqli correct way

I'm starting to use mysqli in my projects, however I've seen two ways to make a connection: One of them is simple and equal to mysql_connect $db = mysqli_connect(...); I saw in w3schools. Another is $db = new mysqli('local...
asked by 25.06.2016 / 19:19
2
answers

Is it possible to use Heredoc with special characters in an array?

I have a multidimensional array, as the example below shows, but I wonder if I can use a Heredoc in it, would it be possible? Could I include special non-escaped characters if I can use Heredoc ? $name_code = array ( array("Nome", "HER...
asked by 06.08.2016 / 18:38
2
answers

Sending an image and other data via JQuery to PHP

I have a question that I can not find a solution to. I need to send via Ajax an image and other fields to a PHP file and save it to MYSQL database. I do not know how I can do this, can anyone give me an idea of what JQuery looks like?     
asked by 27.07.2016 / 03:02
1
answer

Show DIV according to condition in PHP

I have a div that brings a select of the bank, but it can only be shown if it meets a condition. It comes like this: <div id="conteudo" style="display: none;"> If it meets this condition: if (get('data_do_descredenci...
asked by 01.08.2016 / 18:19
2
answers

Extract portion of characters using PHP

Hello everyone, I have the following string: '<a href="http://localhost/mensageiro/1990/">1990</a>&nbsp;(1) <a href="http://localhost/mensageiro/1994/">1994</a>&nbsp;(2) <a href="http://localhost/mensageiro/1...
asked by 27.03.2018 / 04:17
2
answers

Change array structure in php

.tabela-grid{ margin: 0; display: table; width: 100%; } .tabela-grid *{ vertical-align: top; text-align: center; } .tabela-grid img{ width: 100%; display: inline-block; } .tabela-columm{ display: table-cell; } .tabel...
asked by 31.03.2018 / 14:44
3
answers

How do I get the result of the select and assemble the HTML?

My problem is: I have a start date field and a end date field and in my table a date field . The user is going to type a start date and a end date , and in the database I check if there are data included between those dates. If there...
asked by 27.08.2014 / 16:27
2
answers

Integration with Wordpress authentication

Considering a Wordpress-based site and a management system that runs in the same domain, but with fully independent authentication features, I think of integrating Wordpress authentication with the management system, that is, by logging in to Wo...
asked by 02.10.2014 / 05:16
1
answer

Search all records of a respective year and month

In my DB I have the date field of type date (YYYY-mm-dd). What happens is that I want to fetch all records for a given year and month. For example, I want to go fetch all the records for 2014 from month 08. How can I do this? I tried something l...
asked by 29.08.2014 / 18:08