Questions tagged as 'php'

1
answer

Saving data from a form with a bootstrap modal

I have a modal with a form and when I give the button to save the data I have entered, it does not send me to the address / path that is defined in the action attribute of the form tag, and therefore it does not save data In the database, what w...
asked by 25.02.2018 / 14:19
2
answers

Doubt about foreach with mysql data

I'm new to php and mysql, I have a database with some fields already created, the idea is to print a ticket like the supermarkets but I want to list the purchased products one by one, so I read that you could use foreach, this it's the code that...
asked by 25.02.2018 / 08:35
1
answer

Consult several tables

I am using the following code but it does not work for me. I'm trying to bring information from 3 tables: $result = mysqli_query($con,"SELECT a.ID,a.proveedor,a.peso,a.fecha,b.ENTRADA,b.cajas,b.peso,b.pagado,c.ENTRADA,c.monto FROM a entradas...
asked by 30.01.2018 / 06:31
1
answer

Is it possible to 'hash' to $ x-variable?

Hi, I would like to know if it is possible to do the following: $id_user = $_POST['id_user']; $nivel_auth = $_POST['nivel']; $hash_nivel = hash($nivel_auth); $con = "INSERT INTO usuario (nivel) VALUES ($hash_nivel) WHERE id_user=$id_user;...
asked by 29.01.2018 / 18:37
1
answer

Error updating database

I have the following problem: I am trying to send data from a form and the problem arises when I make a decision and try to update Code: <?php include "plantillas/conexion.php"; $clave = $_POST["clave"]; $centro = $_POST["cen...
asked by 31.01.2018 / 20:56
1
answer

open page with window.open and send variable

I have a problem, when sending and registering in the bd a sale sends me a confirmation message and that I show on the screen: This code captures the submit and receives the message: $(".frm-ventas").submit(function(event) { event.p...
asked by 14.02.2018 / 16:26
1
answer

How do I update records in the database?

I have this code what I'm looking for is to update the data of the registers but it does not work for me. modifyingFormat.php <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Creando...<...
asked by 13.04.2018 / 13:35
1
answer

CRUD of users, add more edit and update routes

I currently have a CRUD for the users. I'm using the edit and update path to modify the name and email data, but I need another edit path and an update path to change the user's password. I want to work them separately. The question is...
asked by 13.04.2018 / 00:02
1
answer

Class does not show table values

I would like to know why the values of the query are not shown in the class array. public function login($usuario, $clave){ try { $query = "SELECT usuario, privilegio, estado FROM sc_usuario WHERE usuario = :usuario...
asked by 10.02.2018 / 20:26
5
answers

How to display the radio input selected by a user when printing the screen

is the first time I ask for help since I'm stuck in a code for a few days, I looked for tutorials and help online but I could not solve them, so I go to bother them a little while to see if someone can give me a hand. I'm doing a form in html...
asked by 10.02.2018 / 15:19