Questions tagged as 'php'

1
answer

PHP composer, use of require tag + hash

I'm trying to install the vendor of an application and I have a slightly strange error:    Installation request for sg / datatablesbundle   dev-master # 73ac0ed0ba5adbfe0139b19e1f1c073f4e4c120a - > satisfiable by   sg / datatablesbundle [d...
asked by 07.02.2017 / 08:01
2
answers

Solution to PHP Notice: Undefined variable: db

This is the code: function getCategoryTree($level = 0, $prefix = '') { //$sqll = "SELECT * FROM expense_categories WHERE master_category = ".$level." GROUP BY category_id ORDER BY category ASC"; echo $db."<br/><br/>\n"; $...
asked by 30.03.2017 / 21:09
2
answers

Problem with php page

I set up a very rudimentary pager, when entering my index.php page a query of all the records. To do this, I only pass the page number to show the url and reload the same page, which works. Now I have the need to show and paginate the...
asked by 04.11.2016 / 15:05
1
answer

How to block inputs with js, according to comparisons of dates made in php? Only block the first inputs of the first record

if( ($date >= $fecha_inicioP1) && ($date < $fecha_finP1 ) ) { echo "<br>"; echo "bloquea todos los inputs menos el de primer periodo"; //bloquear inputs de los demas parciales ?> <script type="text/javascript">...
asked by 03.11.2016 / 05:59
2
answers

How can I traverse an html table as if it were a coordinate table?

My problem is this, I'm trying to insert some values into a database (dynamic) html with editable fields, I already have the function that inserts, but my problem is how to relate the value that I place in the table with what I want through a jq...
asked by 07.11.2016 / 22:04
3
answers

How to send data with ajax so that you do not have to reload the page for the changes to come out?

How about, I have an ADD button, which contains two fields, which are filled and the data is sent to the table in mysql and in the table below By clicking on SAVE to send the data I get this message, but I send it to another page, as I do...
asked by 03.11.2016 / 01:23
1
answer

Put the result of an sql query in a variable with PHP PDO [closed]

<?php try { $nombre=$_GET["nombre"]; $password=$_GET["pass"]; $base=new PDO ("mysql:host=localhost; dbname=te_la_juegas","root", ""); $base->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); $sql="select...
asked by 02.06.2017 / 20:01
2
answers

Warning: mysqli_query (): Empty query - PHP MySQL

I have a table where I show all the cabins that I have in my database. Each one of them will have its ID, its file to modify (data of each cabin) and a "checkbox" button to be able to select those that they want to eliminate. 1) When I select...
asked by 28.11.2017 / 22:54
1
answer

How to serialize an array in JQuery with the same PHP schema?

way to serialize an array in PHP $value = array(array('Nombre','Adam'),array('Nombre','Exael')); echo serialize($value); /*a:2:{i:0;a:2:{i:0;s:6:"Nombre";i:1;s:4:"Adam";}i:1;a:2:{i:0;s:6:"Nombre";i:1;s:5:"Exael";}} */ Now I need to serializ...
asked by 24.10.2016 / 20:22
2
answers

php code that does not send empty fields to the mail

What code should I use to check all the fields that it receives from the html and do not send the fields empty? Here I leave the php that I am using: <?php require_once('phpmailer/class.phpmailer.php'); $mail = new PHPMailer(); if( $_...
asked by 25.10.2016 / 23:26