Questions tagged as 'pdo'

2
answers

verify if the user is of legal age

I would like to try to verify before being able to make an insert if the users to register is of legal age can register in the system, but if it is a minor the system will not let it register, since it is required to be of legal age to be able t...
asked by 04.08.2017 / 06:56
1
answer

Error with query ();

Good morning, I've been with this error for a while and I'm unable to solve it to see if anyone can help me out, I'd really appreciate it! $base=new PDO('mysql:host=localhost; dbname=pruebas', 'root', ''); $base->setAttribute(PDO::ATTR_ERRM...
asked by 06.07.2017 / 10:54
1
answer

Use field names in a query prepared with PDO

I connect with this php: class Conexion extends PDO { private $tipo_de_base = 'mysql'; private $host = 'localhost'; private $nombre_de_base = 'basededatos'; private $usuario = 'user'; private $contrasena = 'user'; pu...
asked by 20.07.2017 / 19:42
1
answer

Pass fix value to query

I am trying to pass a value of my fix to my query but at the moment of doing it it says to me:    Array to string conversion My fix comes from a function in a file called functions.php It is the first value of my array that I wa...
asked by 22.07.2017 / 19:24
1
answer

Activate and deactivate concept using PHP PDO

I am a newbie and I can take time to learn PDO php from 0, Well this is the concept to activate and deactivate the category. Can someone help me with this? I would like to update the status of the category, the status should be 0 (deactivate) or...
asked by 15.03.2017 / 16:53
2
answers

header (location) does not redirect

According to my program if I enter a user or password that is not registered, I should redirect myself back to the login page until a valid user enters, but do not grab it instead go to the check_login.php and it stays and does not return .. b...
asked by 22.02.2017 / 05:00
1
answer

Put the result of an sql query in a variable with PHP PDO [closed]

<?php try { $nombre=$_GET["nombre"]; $password=$_GET["pass"]; $base=new PDO ("mysql:host=localhost; dbname=te_la_juegas","root", ""); $base->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); $sql="select...
asked by 02.06.2017 / 20:01
2
answers

Error in web service: Error: SQLSTATE [HY000] [2002] Connection refused

<?php $usu = $_REQUEST['usu']; $pas = $_REQUEST['pas']; try{ // establecemos la conexion con PDO $conexion = new PDO("mysql:host=pagina.000webhostapp.com;port=3306;dbname=id554244_basededatos", "id453244_usuario", "contraseña");...
asked by 17.10.2016 / 07:31
1
answer

PHP: Error: SQLSTATE [HY093]: Invalid parameter number: parameter was not defined

I'm doing a Login method but I can not solve this error, I would really appreciate your help <?php try { $base = new PDO("mysql:host = localhost; dbname = estimasoft", "root", ""); $base->setAttribute(PDO::ATTR_ERRMODE, PDO::ER...
asked by 16.05.2016 / 18:59
1
answer

Insert in MySQL database using PHP PDO Web Service

I am developing a PHP Web Service to consult and insert data in a database. Until now, the web service is able to search the table for records, however it is not able to insert them . There are only three php files. The first one is dbcon...
asked by 05.11.2018 / 22:53