Questions tagged as 'pdo'

2
answers

Save atomic in PHP does not work with success and serialization

A code that does autosave of data in a form works like this: autosave.php <?php require_once '../multiinjet/web/includes/configuracao.php'; try { /*Pegar valores postados no formulário*/ $title=&$_POST['title']; $...
asked by 25.01.2017 / 22:37
1
answer

Use PHP PDO to search

Where is the error in my code. I do not know why it does not return the search result. <?php require_once('db_connect.php'); $conectar = new PDO("mysql:host=$host;bancodedados=$bancodedados;charset=utf8", $usuario, $senha); $nomeProduto...
asked by 10.09.2018 / 23:57
1
answer

Error in SQL query with PDO

I can not make the query, when I try to do it, I get the error: Erro PDOStatement Object ( [queryString] => SELECT userid FROM usuario WHERE email=:email and senha=:senha ) <?php require_once('conexao.php'); // @$email = $_POST['emai...
asked by 14.03.2018 / 21:41
2
answers

How do I upload the image and delete the old one?

How do I delete the old image and upload the new one? The code I am using uploads, only the old image and the current image in the folder ... $novoNome = $img; if(isset($_POST['edit_profile_avatar'])) { if(!empty($_FILES['img']['name']))...
asked by 08.01.2016 / 19:31
1
answer

Insert Into Do not Send Values [closed]

I have this code to send values to a table in the database, it is not displaying any, it is simply not sending the values <?php include "../../lib/inc_con.php"; $mesa = $_POST['mesa']; $tamanho = $_POST['tamanho'][0]; $quantidade = $_POS...
asked by 18.12.2015 / 12:46
1
answer

PDO connection file. How to use? [closed]

I have a PDO connection file. To include this connection in the other files of the system in order to make the requests in the database, I will use this ???? <?php require('conexao.php'); ?>     
asked by 29.09.2014 / 14:43
1
answer

Query user PHP PDO [closed]

For those who have the doubt as I had, below I'll leave the code ready, just change to your project. The code and simply know the user logged in and say the name of it in PHP PDO. If your project is by cookie will work, if it is session adapt yo...
asked by 15.09.2016 / 20:27