Questions tagged as 'php'

2
answers

Make Insert in a database with php

Good morning, I'm trying to add a statement to the database, I'm doing it from an insert. I have five variables, the id, the name, the description, the image and if I want to show the news or not. The connections to the database I have alread...
asked by 28.08.2017 / 11:20
2
answers

Refresh query of a JSON every X seconds

The following Activity gets the data of a file in PHP that generates a JSON with the data obtained from MYSQL , I am new in this JAVA ANDROID , and I have little experience in PHP , I barely defend myself,...
asked by 18.01.2016 / 02:26
2
answers

Error in php, with if

This is the error that appears to me,    An uncaught Exception was encountered       Type: ParseError       Message: syntax error, unexpected 'if' (T_IF)       Filename: C: \ xampp \ htdocs \ upa \ application \ controllers \ admin \ Users....
asked by 11.10.2018 / 17:41
4
answers

The minus sign (-) is not displayed when the value is negative in PHP

I have 2 dates in the code, and I have to calculate the remaining time, I've already done that, but when this value is negative (the date has already been passed), I still show the value without the (-) sign. That's a problem because I need to v...
asked by 22.05.2018 / 17:20
2
answers

Preserve value in a select html + php

I am developing a simple form with html, php and MySQL, which has validations of mandatory fields, invalid characters, etc. html <?php include_once '../../includes/insert/insert_user.php'; ?> <h4 cla...
asked by 19.10.2018 / 21:33
3
answers

Validate values of an array in php

What I need is to validate that at least one position of an array is NOT NULL. For example, I have an array that contains search criteria, that after a process, becomes NULL or with a search value, then I need to validate (before sending to proc...
asked by 12.05.2018 / 10:44
3
answers

Error in consulting the database! from PHP to MYSQL

I had a problem doing this query to the data base. The query variable ($ result1) says 'Error in the query database'. <?php $con=mysqli_connect ('127.0.0.1','root','','freatico') or die ('Error en la conexion'); $username=$_POS...
asked by 19.05.2018 / 18:16
3
answers

How to iterate values in brackets?

I need to iterate with PHP values that I bring from my Database and that are in brackets [158][547][1268] , I thought in an explode but I need the value that is inside the brackets. Thanks!     
asked by 13.09.2018 / 22:45
2
answers

Get JSON value in PHP

I'm having trouble accessing a specific value of a variable that returns a JSON in PHP. My code is as follows: //Llama el SP $sql="CALL tramites_G(".$valuesInsert.")"; $resultado = mysqli_query($database,$sql); if (!$resu...
asked by 24.08.2018 / 22:06
2
answers

Error onclick Uncaught ReferenceError

I want to call a method of my JS and pass a variable but it gives me Uncaught ReferenceError, how can I fix this. PHP / HTML <div class="col-4 col-md-2 topbutton "> &...
asked by 26.09.2018 / 02:55