Questions tagged as 'mysqli'

1
answer

Problem with mysqli and php, just save me a data

What happens is that I have the following code in which I keep only 1 record in the database, after that I get "registration error" that I indicate that it would leave in case the data is not saved correctly. The strange thing is that if I delet...
asked by 27.02.2017 / 21:47
2
answers

What is missing from the loop to update in all the records that are traversed?

if( isset($_POST['asistotales']) && !empty($_POST['numsesiones']) ) { $asistotales = $_POST['asistotales']; //valores de arreglo recibido $numsesiones = $_POST['numsesiones']; //valor recibido de un input $n4 = count($asist...
asked by 04.11.2016 / 07:12
1
answer

How to select and compare results between two tables?

I have the following query SELECT * FROM usuarios WHERE NOT EXISTS (SELECT * FROM pagos WHERE pagos.id = usuarios.id AND mes =< '$mes' AND ano =< '$year' ) I am trying to show or select the users who have not made payments in a range...
asked by 04.09.2016 / 17:46
2
answers

Error [false] when making a query (MySQL - PHP - PHPMyAdmin)

my query is at the end. <?php $usu = $_REQUEST["usu"]; $con = $_REQUEST["con"]; $conexion = mysqli_connect("localhost","root","mysql","android"); $res = mysqli_query($conexion, "select * from profesor where usuario='$usu' and contra...
asked by 08.11.2016 / 23:24
1
answer

Shopping cart type listing in PHP and mysqli

I am working on a list where the user will add items to the list shopping cart type, is what I can think of to explain it better, you can search and add articles and their details (key, description, quantity and cost ) but when I want to add ano...
asked by 18.07.2016 / 23:35
4
answers

enter data to mysql with form

I recently posted the same question but it has stopped working! I'm trying to enter data into a table in MySql. but I get this error: Notice: Undefined variable: username in H:\SERVER\htdocs\SITIO2\content\control_register_user.php on line...
asked by 30.05.2016 / 17:28
2
answers

Problem with select without where to a database from php

<?php $mysqli = new mysqli('localhost','root','alumno','radius'); if (mysqli_connect_errno()){ echo "Fallo al conectar a MySQL:"; exit(); } $query="SELECT id,nombre,autor FROM canciones"; $stmt=$mysqli->prepare($query); $stm...
asked by 07.06.2016 / 15:57
3
answers

Problems saving PHP date

I have a project on the web and I am trying to save the complete date in the database but it is giving me a strange error, I do not understand what the error is. Note: Recently everything was going well because in my database in the field w...
asked by 19.12.2018 / 18:42
1
answer

Insert value in table and automatically obtain the registration ID that you will have

I am making an insertion to a database and would like that automatically after the INSERT the PHP file will get the ID that corresponds to the record (ID_PLANILLA). This I need since I must automatically show a graph with the data obtained....
asked by 24.04.2017 / 19:20
4
answers

Validate existing user

When I prepare this query, I want it to validate if the user exists or not, and for that I use "mysqli_num_rows ()". The problem is that if I do it without preparing the query, putting the query to hair (it is commented in the code), it works. B...
asked by 30.11.2016 / 22:15