Questions tagged as 'php'

1
answer

How to use a variable that returns a return

I'm pretty clumsy with the functions, and more with the use of return . I have this code: public function addAuthor($autor, $nacimiento, $descripcion) { $sql = $this->db->prepare("INSERT INTO autores (Autor, Nacimien...
asked by 20.06.2017 / 15:25
2
answers

I have a problem with my PHP, apparently when I enter anything in username and password can log in even without being a user

I have a problem with my php, apparently when I enter anything in username and password I can log in even without being a user <?php session_start(); require 'conexion.php'; if($_POST['proceso_ingreso']=="iniciando"){...
asked by 26.06.2017 / 19:57
1
answer

remember user and password in browser

a question I am trying that when it logue and select in the checbox is recorded in the form this is the code I use if(isset($_POST['recordarme']) && !empty($_POST['recordarme'])){ $dominio = $_SERVER["HTTP_HOST"]; setcookie("recordarme...
asked by 16.06.2017 / 00:09
1
answer

How to display a directory of folders and subfolders of a web system

I am developing a project where you can see a directory by breaking down Folders, Subfolders and Files. I'm really something green in this php, and I did not find any examples of how to show it I hope you can give me some example or guidan...
asked by 14.06.2017 / 18:57
1
answer

Send several js files

I have a form inside a modal and I send the data by post using ajax. The problem is that you can send several files at once but I get the following error: jquery-1.11.1.min.js:4 Uncaught RangeError: Maximum call stack size exceeded at Vc (...
asked by 15.06.2017 / 16:12
1
answer

PHP-mysql error (PDO) [closed]

I have a question, I have this class: <?php class DB{ //Función para conectar con la base de datos public static function ejecutaConsulta($sql) { $servidor = "localhost"; $dbname = "vehiculos"; $usuario = "root"; $contrasena...
asked by 02.06.2017 / 15:36
1
answer

Datetime-Local to Y-m-d format H: i: sP '?

I'm working on angular and I'm saving the datetime of two datetime-local with a ng-model <input type="datetime-local" ng-model="column_Data.date_Start" placeholder="yyyy-MM-ddTHH:mm:ss" min="2014-01-01T00:00:00"> and then I am sending...
asked by 02.06.2017 / 15:31
1
answer

Print a query sql the count (*) in php

I have this query prepared in a php file. $consulta = $conn->prepare("SELECT examen.idexamen,examen.detalles, count(*) from examen,preguntas having count(*) IN (SELECT count(*) FROM preguntas group by pregunt...
asked by 15.05.2017 / 08:13
1
answer

how to save with a select in the database?

I need that when you select an option and click on the save button save me and my database but not how to program the php part. <!DOCTYPE html> <html> <head> <title>Prueba Select</title> </head> <body...
asked by 05.04.2018 / 14:06
2
answers

Remove special characters to a string in PHP?

How about? Veran I have a little problem with some strings that are full of a unicode character. My string is this: $variable = "c\u0000o\u0000d\u0000e"; Which has this unicode character: \ u0000 I would like to know how I can remove all...
asked by 09.04.2018 / 05:05