Questions tagged as 'php'

2
answers

Mount the parameters of a URL dynamically

I have a page on a system where I list the products registered in the DB, I am implementing some filters within this page, and I would like to update the links of the filters as requested in the URL (GET REQUEST): At the beginning of the pa...
asked by 10.03.2015 / 12:21
3
answers

How to extract a word from a URL in PHP

In these examples below:    + bbbbbbb2.virtua.com.br - take the virtua   + 000-74-4-000.paemt702.dsl.brasiltelecom.net.br to take the brasiltelecom   + 111.222.22.222.dynamic. adsl.gvt. net.br - take gvt I've tried: $texto = "189-72-5...
asked by 29.10.2014 / 20:44
1
answer

Time access restriction with php

I want to develop a security system, which serves both contact form and login, the intention is that it is an addition to the use of CAPTCHA, or in some cases a substitute. The logic is as follows: The user can access a maximum of 4 times for...
asked by 05.10.2014 / 05:54
2
answers

How to add jQuery data in a table?

How to get jQuery the sum of all the class="subtotal1" fields returned from the database? <?php while($M_P = mysql_fetch_array($Dados_Produtos)) { ?> <tr class="somatoria"> <td><?=utf8_encode($M_P['produ...
asked by 15.10.2014 / 04:40
2
answers

How to sort numbers in an array?

I do not find the function to sort the numbers drawn more and more. <?php $resultado = array(); for ($i = 0; $i <= 5; $i++){ array_push($resultado,rand(1,60)); } print_r($resultado); # Exibe os números sorteados fora...
asked by 06.09.2015 / 12:11
3
answers

Filters with PHP - Search Form

How could I make a filter like that of the example image? The part of the tables with the data and SELECT to look for is quiet. What I'm suffering from is how to assemble PHP code for this, maybe someone has a way for me to learn how t...
asked by 12.09.2015 / 23:53
2
answers

INSERT in two different tables - MySql

I have two tables in Mysql: Alunos: id, nome, idade, email, senha. login: id, email, senha. When I insert to write the information in the alunos table, can I make another insert to write the email and password in l...
asked by 03.10.2015 / 21:04
1
answer

How to Transcript JavaScript Functions for PHP

How can I transcribe these functions to PHP? function bytesToWords(bytes) { var str; for(var i = 0; i < bytes.length; i += 2) { var char = bytes[i] << 8; if (bytes[i + 1]) char |= bytes[i + 1];...
asked by 21.04.2015 / 22:30
1
answer

Apostroph within echo

Good, I'm trying to put the pictures on the slide, but the apostrophe is breaking, where is the error? edited below the summary after the tests that I did even using the \. meu codigo atual echo "<div class='fill' style='background-image:ur...
asked by 15.04.2015 / 01:33
2
answers

Get last delimiter with explode

I want to get an extension of a file but the name of some images comes type:    adsfasdfasd.234.asdfa.3rfr.jpg       asdfsdafasdfasdf.45eg.png I'm trying to use the code: <?php if(is_dir("img/$noticia->idnoticia")) { $diretorio =...
asked by 06.03.2015 / 00:50