Questions tagged as 'php'

2
answers

How to send registration only once in INSERT

Hello, I have an INSERT, send, all great, but when you click the submit button several times, it sends several, records, how can I avoid this? Code: <?php $id_noticia = $edit["id"]; $autor = $_SESSION["username"]; $texto = $_POST["t...
asked by 28.07.2015 / 05:04
1
answer

Mysql Event Scheduler needs super privileges

Good morning, I have a website hosting in a company, I created a very simple system that through an event that runs of a certain time in a certain time and makes changes in the elements of the database (in this case it changes the field "state"...
asked by 30.05.2015 / 14:07
1
answer

How to interconnect two arrays?

If I have an array: Array ( [0] => Array ( [color] => azul ) [1] => Array ( [color] => branca ) [2] => Array ( [color] => prata )...
asked by 03.06.2015 / 21:28
1
answer

How PDO :: PARAM_STR parameter works in PHP + PDO

Example: $sth->bindValue(':calories', $calories, PDO::PARAM_INT); PDO::PARAM_INT Is this parameter a kind of validation for data type? If so, why not give me an error when I pass an integer?     
asked by 11.06.2015 / 22:00
1
answer

Extract HTML value

I get the html and a part of it from where I need to extract the data and this one <td class="address-list-item"> NOme silva <div class="modal-content" style="display:none;"> <div class="address-list-moda...
asked by 03.06.2015 / 08:09
1
answer

Problem with select dynamic to show dropdown menu for user

I am building the visualization layer for the clients of a system in my database I have two tables with relationships: Ihaveamethodtoreturntheresultsofthesetables:publicfunctiondropDownCategoria(){$consulta=PDOUtil::getStance()->prepare("SELE...
asked by 14.06.2015 / 20:38
1
answer

How to return an integer value referring to the rows in the codeiginter?

How do I return an integer value for the rows returned in the select? $query = $this->db->where("categoria_titulo", $categoria); $query = $this->db->get("categorias"); $query = $query->num_rows(); echo $query;     
asked by 10.08.2015 / 23:23
2
answers

Problems with PHP session - Continue a session

I'm setting up a client site and I need to do login control. The user can log in normally and without error, but sending it to the main page when he is logged in is as if he had not logged on. Here's my code:    login.php <form class="f...
asked by 11.08.2015 / 22:57
1
answer

Doubt Laravel 5 - Libraries and Functions

<?php namespace App\Http\Controllers; use App\Http\Requests; use App\Http\Controllers\Controller; use App\ListaProduto; use App\Produto; use Input; use Illuminate\Support\Facades\Request; use Session; class Prod...
asked by 13.08.2015 / 18:29
1
answer

php code for simple plots

I have this code php to show the number of parcels, but it shows like this: Parcele up to 6x without interest. I want him to show it like this: Parcele in up to 6x of 30 reais. In the case of 30 reais is just an example, he would have...
asked by 11.08.2015 / 05:24