Questions tagged as 'php'

2
answers

Bring data from the table using an ID

Please, I need your help with this. I have this table in the view: What I need is that in the ID column I get a list to select the IDs that I have in this database, and when selecting an ID I load the item and the unit price in the view...
asked by 05.12.2018 / 23:23
1
answer

how to assign a key to an array within another array?

Good I have this code in my controller (it's in mvc). function actualizar_formato_valuaciones() { $id = $_POST['id']; $antes = $_POST['antes']; // echo $id; //print_r($id); print_r(implode(',',(arra...
asked by 07.12.2018 / 01:17
1
answer

unexpected php error

I have the following error in my form, I know I'm missing something but I do not know where. look: <?php if(Session::getUID()!=""):?> <?php $u=null; if(Session::getUID()!=""){ $u = PacientData::getById(Session:...
asked by 04.01.2019 / 22:04
1
answer

How to get the session number (which is supposed to be unique and unchanged)?

I have read that if a user opens a session a unique ip is created for their session, then I thought I could use the unique session identifier to simulate an ip. I want to know how to return the unique session number that is assigned to the perso...
asked by 16.12.2018 / 22:02
1
answer

How to validate a datetime with date in a php and mysql query?

I want to validate the entries and exits of a number of people in the day, that is, count how many people have entered, how many have left. for this I have a field called fecha_entrada and fecha_salida (both fields are datetime), t...
asked by 17.12.2018 / 05:00
1
answer

How to count certain values within a POST?

I am sending a set of files through POST, what I need is to have PHP how many images are inside that POST, what is sent is of this type: file[]: 554f2b2f7d00f90fa24cfcd4f1a1de19.jpg file[]: 75554a79325ebd3342c27c7bb7d3ffc4.txt file[]: 17623f05...
asked by 16.12.2018 / 20:57
2
answers

How can I use $ _SESSION?

I have this error "Notice: Undefined variable: user in C: \ xampp \ htdocs \ html \ index2.php on line 9" <?php $user = $_POST['user']; $pass = $_POST['pass']; $impr = $_SESSION['user'] = "$user"; //conectar a la base de da...
asked by 25.11.2018 / 19:22
1
answer

Assign two variables to a path in PHP _FILES

I have the following code to save files in php, it works correctly, I create the route with the corresponding id well $permitidos = array("application/pdf"); $limite_kb = 8360; if(in_array($_FILES["acta"]["type"],...
asked by 28.11.2018 / 20:08
1
answer

Status of colors for inventories, PHP and JS

An inventory system is being developed, where after registration they appear in a table. In the registration form you must specify quantity , reorder_level (cantidad minimima) , 'target_Stock (maximum amount). By certain proce...
asked by 28.11.2018 / 22:38
2
answers

How do I get a Select with PDO in Php correctly

I'm trying to get a select from a database. Index Code <?php @$mostrar=$_POST["mostrar"]; if($mostrar){ $form=1; $mMatricula=$_POST[...
asked by 24.11.2018 / 06:10