Questions tagged as 'mysqli'

1
answer

mysqli: Could not fetch mysqli_result

I want to save the result of a query in $_SESSION , but when I try to retrieve the query from $_SESSION , the error occurs    "Could not fetch mysqli_result". Note: I use session_start() . Here is the code: Query mysq...
asked by 30.12.2016 / 19:11
1
answer

I want the example of why substituting 'by' and '\' for parameters to a query is dangerous

I see many posts on this subject, but I do not see any examples that fit in my case. function sanitize($value) { $val = str_replace("'", "''", $value); $val = str_replace("\", "\\", $val); return $val; } The query would be m...
asked by 25.07.2016 / 23:22
1
answer

Problem with jQuery.ajax php

Well, I have a problem that I do not know what to do. I've tried to do everything but nothing. It is the following I am doing a php chat but this is giving an alert () error:    ERROR! jQuery(function(){ jQuery('body').on('keyup', '.c...
asked by 16.05.2016 / 00:24
2
answers

Error in a SQL syntax - mysqli_real_escape_string

I have a syntax error in my code, but I can not find which one is wrong. This is the error I'm getting:    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '...
asked by 17.10.2015 / 05:25
1
answer

I created a registration system using PHP + MySql there at the time of execution it asks to replace MySql with MySqli ... Which ones should I replace?

<?php $host = "localhost"; $user = "root"; $pass = ""; $banco = "dbcadastro"; $conexao = mysql_connect($host, $user, $pass) or die (mysql_error()); mysql_select_db($banco) or die (mysql_error()); //mysql_connect_banco($host, $user, $pass); ?&...
asked by 12.05.2015 / 13:34
2
answers

trying to connect with mysqli

I'm trying to connect to the database via myqli with php but I can not. Here is the code: <html> <head> <title>sistema de cadastro</title> </head> <body> <form method="get" action="cad...
asked by 09.09.2015 / 23:52
2
answers

How to create a button if you are logged in to an account

Hello, I would like to know when someone is logged in to create a button of type FILE. This created the system of registration and login, but I do not know how to know when it is logged in or not. index.php <!DOCTYPE html PUBLIC "-...
asked by 01.05.2015 / 03:06
2
answers

While not stopping when you should

I have the following code: <div class="row"> <? $tag = mysqli_real_escape_string($connection,$_GET['categoria']); $result = $connection -> query("select * from produtos where tags like '%$tag%' and online='0' order by id limit 4...
asked by 19.01.2015 / 23:49
2
answers

Dynamic Form? how to make?

I have the following question, I have a while in PHP, and in this while I have a form and a submit button that sends this form , but as they are multiple records it repeats this form and the system only detects the first fo...
asked by 20.01.2015 / 02:26
2
answers

PHP and MySQL: Database does not update

Good afternoon everyone, I'm making a screen for editing personal information. My code for capturing the typed data is this: <?php require("../config/functions.php"); require("../classes/BDConnection.class.php"); require("../classes/Academi...
asked by 20.06.2015 / 19:54