Questions tagged as 'php'

1
answer

Include php in bootstrap takes me to the top

As the title says, adding an include in a bootstrap template and pressing the "calculate" button takes me back to the top of the page. The include is a calculator and the codes that fail can be: <section id="calcular"> <div...
asked by 29.01.2017 / 12:53
2
answers

Difference between loop while and foreach

I have two codes to list a query, the connection is with PDO. $BD = new ConexionDB(); $sql = "SELECT cod, nom from tabla"; $sth = $BD->prepare($sql); $sth->execute(); $valor = 0; foreach($sth as $fila) { $valor++; echo $valor."...
asked by 11.01.2017 / 17:31
1
answer

Problems with PHP array

Dear. A MySQL query from form generates the following php array: Array ( [0] => Array ( [nomtag] => Flujometro Entrada PG TK [Fecha] => 2016-01-01 [Valor] => 1234567...
asked by 13.01.2017 / 17:14
2
answers

Pass variables from PHP to jQuery and vice versa

What is the best way? I've seen this question where variables are passed in this way: <?php $row= "pantalla"; ?> <script type="text/javascript"> var row = '<?php echo $row;?>' </script> Also applicable to ar...
asked by 18.01.2017 / 09:53
1
answer

validate form with jquery-validate in ajax

Hi, I have the following problem, I have made a save function with PHP and Codeigniter , using AJAX too .. everything works fine, but it turns out that I want to validate my form using jquery-validate before making the AJAX request, for...
asked by 19.01.2017 / 15:44
2
answers

Bring data from the table with where in codeigniter

Hello friends, it turns out that I have this information in the table: and with CodeIgniter I need to bring all the data of id_servicio entered. the code I have is this: In the model: function getcoffeInfo ($id_servicio)...
asked by 16.01.2017 / 20:57
3
answers

PHPMailer, send html file with image and external css as message

I'm using the following code to send an HTML email with an attachment (zip) and if it works. What I want is to make changes for: 1. Send an HTML template already pre-made containing CSS (it's in an external file). 2. Embed (not attach) any...
asked by 29.04.2017 / 11:48
2
answers

Show total messages by user sessions

I have a problem with a query. I want to show the total number of messages that have been sent to each user. Example: Carlos has 2 messages and Juan has 1 message but when I enter Carlos' session I get 3 messages. I mean, he's telling me abou...
asked by 02.05.2017 / 05:44
1
answer

Error in my form with a webview?

What error can you see here? Since in the browsers the load of files works well, but when I use a webview (tried with another web of testing and that works well) in my web it does not work, therefore, everything indicates that my form something...
asked by 30.04.2017 / 13:13
2
answers

Obtain individual fixes with PDO fetchAll

good morning, I'm trying to do some validations with fetch all this is my code $usuariodb = strtolower($_POST['usuario']); $passworddb = strtolower($_POST['password']); $conn = new PDO('mysql:host=localhost;dbname=db;charset=UT...
asked by 02.01.2017 / 18:58