Questions tagged as 'php'

1
answer

How to make a frequent update

Hello, for example, I have the textbox SENHA and CONFIRMARSENHA , and testo if they are different, but I will only know when it presses a button, and I want it at the moment they are different ( without having to press the button) I...
asked by 30.04.2015 / 23:07
1
answer

I changed mysqli to PDO and I can not get row

In my mysqli it was easy $_SESSION['userphoto'] = $row['userphoto']; How to make PDO work? ConnectionLogin.php session_start(); $stmt->bindParam(':email', $_POST['email']); $stmt->bindParam(':senha', md5($_POST['senha'])); $...
asked by 15.04.2015 / 01:22
3
answers

Search results for 3 table with date of last 5 days

I have the following tables: What I'm trying to do is fetch the names of users who have no records in tbl_votos and no resources in tbl_recursos in the last 5 days . I'm using php and mysql.     
asked by 08.05.2015 / 15:08
3
answers

Dynamic Form

I'm trying to fill out an HTML form with random values, so I'm using a array with predefined values and the rand() function of PHP. The problem is that the value attribute of input is showing PHP code instead of using...
asked by 04.05.2015 / 05:31
1
answer

Passing results from an array to variables

The query below returns the total number of records per modality: $sql = "SELECT modalidade, COUNT(*) as total FROM a_finan GROUP BY modalidade"; $resultado = mysql_query($sql) or die( mysql_error()); while ($linha = mysql_fetch_assoc($res...
asked by 17.04.2015 / 15:02
2
answers

How do I correctly remove the user after a downtime?

ANSWER Below is the answer for anyone who has experienced something like this. First I created an extra field in my table called ActiveTime where I store the time () as soon as the user logs in. See below: $tempoAtivo = time() + 30;...
asked by 05.05.2015 / 17:17
4
answers

As per link in table?

I have a Table in PHP and in every tr I need a link <?php $con = mysqli_connect("localhost","root","", "saber"); mysqli_set_charset($con,"utf8"); $result = mysqli_query($con,"select id,nome,vista from mensagens"); while($row = mysqli...
asked by 10.07.2015 / 17:19
3
answers

Constant containing Array (array)

When I try to define a constant as an Array it gives error. define('COLORS', ['red', 'blue', 'green']); Is there any way to define an Array in the value of a constant?     
asked by 20.06.2015 / 03:50
2
answers

Problems with Json

I have a file with JSON-formatted requests made to a server and my problem is that I know how I can get these requests on those lines and deal with php Example of how the File is {"a":1,"b":2,"c":3,"d":4,"e":5} {"a":1,"b":2,"c":3,"d":4,"e":...
asked by 27.06.2015 / 19:45
1
answer

Do the INSERT of an Array, regardless of the amount of $ _POST

For example, a person adds many Images to be published. It can add 4 images, so you can add 10,15,1,3 and so on. How would you look for QUERY ? Form POST Array: array ( [IMG1] => /img/nomedaimagemquefoiupload1.jpg [IMG2] => /...
asked by 12.07.2015 / 01:59