Questions tagged as 'php'

1
answer

extends from twig

I am starting to use smfony and I have some doubts, I have the following base template: base.html.twig <!DOCTYPE html> <html> <head> {% block head %} <meta charset="UTF-8"> <l...
asked by 11.06.2018 / 01:57
1
answer

Form in PHP to update MySQL Update PDO - exec?

I have to use this code, I do not have another option, I do not find how to make the assignment in the UPDATE receiving the input data $id = $_POST["id"]; $nombre = $_POST["nombre"]; $categoria = $_POST["categoria"]; $precio = $_POST["precio...
asked by 12.06.2018 / 05:14
2
answers

How to reorder this array?

I have the following array: $array_atual = array ( 'id_item' => array('1', '3'), // 'id_item', 'id_item' 'cantidad' => array('15', '10') // 'cantidad', 'cantidad' ); I would like to know how I could leave it in the following w...
asked by 10.06.2018 / 13:27
2
answers

How to subtract a specific time with the system time in php?

How can I make the $ total variable give me a result in hour format? Now with this code, the only thing I achieve is to subtract the hours, but not the minutes, and it only shows me a number. example: 07:45 - 03:35 = 4. I would like instead of g...
asked by 13.06.2018 / 03:22
2
answers

Exec command does nothing in PHP

I have the following code: <?php echo "Hola mundo."; exec ("uname -a"); exec ("echo uname -a"); ?> the exec command does nothing on the two lines. I'm newbie in php and I'm stuck. SO Lubuntu 18.04 xampp 5.6.30 PHP Ve...
asked by 17.08.2018 / 03:37
1
answer

how to do for JSON only replace data in a column with PHP?

good day The problem that I have is that in my datatable I want it to show certain data with a style TO A COLUMN IN SPECIFIC, for example with $ for prices, or the dates with its format, etc. only that when doing this code, it only replaces what...
asked by 16.08.2018 / 20:05
1
answer

Send data of an input

I would like to know how I can send the stored data of an input, other than the name . Thank you very much for the help. <div class="col-xs-9 center-page" style="width: 83%"> <div class="row"> <div class="col-lg-4"&...
asked by 07.06.2018 / 22:10
1
answer

Load a select depending on another with php

I want to load my select where I show the registered programs and load in another select the subjects associated with the program that I chose immediately I am working with the php myadmin database (It should be clear that I have not done it yet...
asked by 29.10.2018 / 15:46
1
answer

Assign results from a WHILE to a Variable

guys, I have the following case: I have the following code: $sql ="SELECT * FROM monto LIMIT $limite_base, $l "; $resultadosql = mysqli_query($db, $sql); while ($rowsql=mysqli_fetch_row($resultadosql)){ printf ("%s\nBsS\n", $rowsql[1]); $...
asked by 28.10.2018 / 08:56
1
answer

When detecting IP in PHP, it shows me ":: 1" [duplicated]

My question is if it is possible to use public IPs on a local server, I use WAMP, this is what I need to do some tests in which I use the detected IPs because as local servers can not detect public IP's, when trying to do it, it shows me :: 1...
asked by 26.06.2018 / 03:29