Questions tagged as 'php'

3
answers

Filter results in PHP / MySQL

I'm doing a message page in PHP and MySQL, I have a table called usuarios with the fields id , user , edad , pais and ciudad . I would like the user to be able to search for other users according to certa...
asked by 16.08.2017 / 16:05
3
answers

The query does not work, it does not detect letters

I'm trying to do a query in PHP and MYSQL, but it does not work for me, 'grado' is a number, for example 2. If I make the query only with 'grado' if it works, but if I try with 'grupo' which is a letter, for example B, it...
asked by 09.02.2016 / 15:58
2
answers

Get email from a varchar field (in the BD) and then update

I have the following data recorded in my column: As you can see, it's a varchar and one I can record whatever I want, the idea is to create an application in php , that only take me inside the varchar the email , and then update t...
asked by 11.09.2018 / 20:03
1
answer

Problem inserting data with MySQLi

I have this database created in phpMyAdmin: The problem I have is that when I insert the data of the form where I create a user manages to connect to the database, the data sends them but does not save them, concluding with the redirect...
asked by 26.12.2015 / 07:20
3
answers

How to verify that the user that I intend to register already exists?

Here is the save process: $nuevoobjeto= new Objeto(); $cedula = $_POST['cedula']; $nombres = $_POST['nombres']; $apellidos = $_POST['apellidos']; $telefono = $_POST['telefono']; $telefono1 = $_POST['telefono1']; $telefono2 = $_POST['telefono2...
asked by 10.04.2018 / 16:37
3
answers

How to select several records with Checkbox?

I'm doing a facturer, and when it came to billing several products, it occurred to me to use checkboxs since I still have not gotten with JS , so is the code of the checkboxs : <?php require_once ("ModeloProductos.php");...
asked by 29.03.2018 / 04:57
3
answers

is there a way to work with sessions or cookies without a database?

Hi, I need to create a simple login form. I'm supposed to work without a database, and once the login accepts me, I redirect to the home.php page, but you can not directly access home.php . But they told me that it had to be done without a da...
asked by 16.10.2016 / 01:34
2
answers

How to return a record that contains several values separated by comma

I have this table in the database: Tabla de Ejemplo: id - registro - valor 1 - compras - 1,2,6 2 - ventas - 3,4 3 - deudas - 5 I want to make a query where I send only the number 3 and bring me the record 2 in this exampl...
asked by 18.08.2016 / 22:31
2
answers

How can I protect my site from XSS attacks?

I would like to protect my site against XSS attacks of any kind, as I can do with htaccess or php.     
asked by 07.03.2017 / 08:16
3
answers

Obtain client IP from PHP

How can I get the client's actual IP address from PHP if possible. This means that there is a direct connection, or by means of a proxy , or router or whatever, I always identify the IP real of the client computer....
asked by 04.05.2017 / 15:14