Questions tagged as 'php'

1
answer

Problems when restoring a base in mysql

By mistake delete a table from my base, I have a backup before, but when wanting to restore it, it tells me that the table does not exist, I need to create it first? I already try to do it but there are many fields and I do not remember exactly...
asked by 18.05.2018 / 18:48
1
answer

Create an array of JSON objects with PHP

I have 3 classes in PHP which I use to extract information from a database with which I would like to print or return an array with json objects from all the states and their respective countries so that it will be somewhat similar to the follow...
asked by 22.05.2018 / 05:46
2
answers

Help with this php error query between

<form method="_POST"> <p>Busqueda</p> <p> <input type="text" name="busca" id="busca"> </p> <p> <input type="text" name="busca1" id="busca1"> </p> <la...
asked by 19.04.2018 / 17:35
1
answer

Change an avatar created with advanced custom fields from the frontend

I use the latest pro version of ACF. With this I have assigned an image as an avatar that is then seen in the custom-profiole-template that I have made. My problem is that this avatar must be able to change from the same frontend by attaching a...
asked by 18.04.2018 / 06:33
1
answer

Is it possible to make a comment box without Databases?

I was looking for if it is possible to make a section in which the comments are saved in a .txt, and every time you comment, this file is updated, only with javascript and php.     
asked by 26.03.2018 / 23:45
1
answer

json file values are not returned in php

I have the following function, which returns the values contained in the file conf.json, which I verified that it exists, that has values inside, and that the route is correct. public function getJson(){ $get = file_get_contents('conf.json...
asked by 25.03.2018 / 18:05
3
answers

How to convert a string into a date with PHP

Can someone tell me how to convert a string with a date in this format "2000-01-01 00:00:00" to an object of type Date ? I get the date from a query to a database mysql . I know it must be silly, but I can not do it....
asked by 27.03.2018 / 11:41
1
answer

error when querying in mysql from php Warning: mysqli_fetch_array () expects parameter 1 to be mysqli_result, boolean given in

When trying to make a query in mysql from php to start a session I get the following error: Warning: mysqli_fetch_array () expects parameter 1 to be mysqli_result, boolean given in C: \ xampp \ htdocs \ procesologin.php on line 10 after the quer...
asked by 27.03.2018 / 06:29
1
answer

php syntax check ','

I have a problem to concatenate a query with order by ...ORDER BY post_author DESC, post_date DESC; This query works in mysql perfectly. But in php I do not know how to add the comma (,) 'orderA' is post_author 'orderB' is DESC 'orderC'...
asked by 26.03.2018 / 03:43
1
answer

Syntax error when trying to insert data into MYSQL with php

When trying to insert the parameters of "User" and "Password" extracted from an HTML form, I miss an error of mySQL Syntax. This is my code when inserting my code require_once ('Conecction.php'); try { // Iniciar la conexión a la base...
asked by 19.03.2018 / 19:32