Questions tagged as 'php'

2
answers

PHP "reserved" words that I can not use

I'm putting together a script in PHP that what it does is generate the text that goes inside a .php file, from there I go through table and other things, but when I want to use the word, for example, $_POST[] , it generates me an error, ho...
asked by 08.02.2018 / 16:33
3
answers

Help with this code does not remove the comma to the last element in this cycle

$i = 0; while ($i < $cuenta) { $actualizaInfoActualizar.= '$'.$campos[$i].', '; $i++; } I want to remove the (,) that is generated in the last element, the others are fine.     
asked by 30.05.2018 / 06:48
3
answers

Insert data with AJAX

What is the correct way to perform a data insertion with AJAX. I have seen several tutorials, but they are very different and somewhat confusing. Some use this code xmlhttp=new XMLHttpRequest(); and another no. Some declare variables for...
asked by 14.07.2016 / 22:00
2
answers

Concatenate a PHP variable in a MYSQL query

I'm doing a query SQL in PHP using MVC . I'm doing a function which has a parameter and this is used in the query SQL . This is the code and up to this point it works for me. public function miFuncion($u){ $stm = $t...
asked by 04.01.2019 / 16:52
2
answers

How to 'set' an index and value in a PHP array?

In PHP I have an arrangement that will show below, I sent a request to the model and this me retorna el id , the idea is that I can 'set' 'id_company' => $insert_id in the array $datos , but when I did a array_pus...
asked by 11.12.2018 / 23:12
2
answers

Validate which input is date format

I have a form, with an input that is called Date Birth and is of date format, what I need is to validate the server side, using php that that input is a date. for example, validate that the name is mandatory: if (trim($nombre)==""){ $er...
asked by 13.12.2018 / 20:36
2
answers

Problem with POST and AJAX

The problem is that I send a form with AJAX in POST. Everything goes well in the FIRST SENDING, now if I make the second shipment, it keeps double of itself, and the third shipment, triple of itself, and so on. So, could you tell me some way to...
asked by 26.06.2016 / 21:35
1
answer

how to consult 2 different results in the same column?

I am trying to make a query, where in the same column I have two different states, I explain them column = states state 1 state 2 my code for $auc = "SELECT * FROM resultados WHERE estados=1"; $au_count = $conexion->query($auc);...
asked by 27.06.2016 / 16:03
2
answers

jQuery modal window does not close

Good morning classmates I'm in a problem with jQuery , I'm doing a system with a modal window, what happens is that it does not close me. This is the code: $(document).ready(function(){ $('#frmPaciente').dialog({ autoOpen:...
asked by 28.11.2018 / 20:25
3
answers

Simple Question by PHP

I have this variable extracted from MySQL, what I want is that if NOT NULL is seen in PHP but if it is NULL, no result in PhP is seen, is this possible? <? echo ''.$result21['Nombre_Esp'].'' ?> If it is positive how should I place the...
asked by 26.11.2018 / 19:44