Questions tagged as 'php'

1
answer

How to leave the date in this format 27-Feb-17 at 21:52

fast thing I need to know how to leave the date in this format 27-Feb-17 at 21:52 my code is this <?php echo date('d/m/Y H:i', $news['published']); ?>     
asked by 14.05.2017 / 20:00
2
answers

Display days of the week in order with PHP

I have this html: <div class="base-semana"> <div class="dia-semana"> <div class="dial"> DIA DA SEMANA </div> </div> &...
asked by 09.05.2017 / 22:58
1
answer

Select with LIKE and POST

Hello I'm trying to use a LIKE in a SELECT, the data came via GET, but it does not work, what could be wrong? $nome = $_GET['nome']; $row=$db->prepare("SELECT * FROM cadastro WHERE nome LIKE '%$nome'%"); Thank you     
asked by 15.05.2017 / 14:07
2
answers

Distinguish equal fields in a SELECT with LEFT JOIN

In SELECT done in two tables with similar fields I'd like to distinguish the field from each table when it shows the results. For example: $sql = BD::conn()->prepare("SELECT a.*, b.* FROM tabela_a a...
asked by 24.02.2017 / 14:12
2
answers

Function to create hash in SRI pattern

I was looking at a new specification W3C SRI (Subresource Integrity) , which roughly means Sub-feature integrity that promises to bring more security to features hosted on third-party (or in-house) servers already in use by BootstrapCDN , C...
asked by 09.03.2017 / 02:12
3
answers

what is the best way to create a cookie for the user voting system one time vote

this system for star rating is working everything but I just wanted to create a cookie so that user votes only once every day I tried in several ways but the cookie is not generated $(function(){ var average = $('.ratingAverage').attr('d...
asked by 06.03.2017 / 16:18
2
answers

How do I save a txt in ANSI with fwrite?

When I run the PHP code below $arquivo = fopen("emails.txt","w"); while($dados = $cod_user->fetch_array()){ $bla = $dados['descricao']; echo $dados["descricao"]."<br>"; fwrite($arquivo,$bla); } It is automatically sav...
asked by 08.03.2017 / 21:11
1
answer

Wordpress, MultiSite second site post also appear on the main site

I have a question on the wordpress multisites question ... I need the posts made on site2 to be seen also on site1, but not the opposite ... Is there such a native possibility? is there any plugin to do this? or some other way? Thank you v...
asked by 08.05.2017 / 21:36
1
answer

How to remove point altitude in a polygon?

Below is a representation of a Polygon in a KML. See: <coordinates> -112.2550785337791,36.07954952145647,20 -112.2549277039738,36.08117083492122,20 -112.2552505069063,36.08260761307279,20 -112.2564540158376,36.08395660588...
asked by 03.05.2017 / 18:53
1
answer

Use Laravel's Crypt without using the framework?

I need to use the laravel component "Crypt" but separate without using the framework, I installed it via composer. link include 'vendor/autoload.php'; use Illuminate\Encryption; use Illuminate\Support\Facades\Crypt; use Illuminate\Contrac...
asked by 12.01.2018 / 15:42