Questions tagged as 'php'

1
answer

Modify table field by clicking on the Boolean field

I have a select query to show me the exams that a student has done in a table. There are two fields in that table that I modify dynamically with select in javascript but I have another boolean field that I would like to make when clicking change...
asked by 22.03.2018 / 11:58
2
answers

Check two PHP tables

I have to make a list of the daily reports made by commercial agents and office managers in a single list. The reports are stored in the PPR table which has an id_user (if it is saved by an administrative) and a id_agent (if the agent makes the...
asked by 14.03.2018 / 09:11
2
answers

show confirmation message depending on the select

I have this form and I want you to show me a confirmation message just by selecting "CANCELED" before sending the form: <form action="<?=URL?>comprobantes/actualizar_estados" method='post' id="frmEstado2"> <div class='modal-...
asked by 13.03.2018 / 16:27
2
answers

Object of class stdClass could not be converted to string

From the controller I execute the following query: $pruebas = DB::select( DB::raw("SELECT t1.id, t2.name AS 'Type', t4.company AS 'Company', t4.name AS 'clientName', t4.lastname AS 'clientLastName', t4.email AS 'Co...
asked by 16.03.2018 / 16:20
1
answer

I can not access a folder on my website

I have a website where if I access the main page of the site it does not show any problem and I can access it successfully. The problem is that within the site I have a folder called chamilo and trying to access it gives me the error 404 as if t...
asked by 27.02.2018 / 23:59
2
answers

Autocomplete failure

I am trying to fill some inputs depending on the value of a main input ... I mean, I have a form inside a div with an id so I can call it from a js <div id="revisarCliente"> <form role="form" method="POST" class="formularioVenta"...
asked by 27.02.2018 / 23:47
1
answer

Obtain data from tables of different database

I have a dilemma that I try to do something that I do not know if it is even possible, I have 2 databases dpnmwin and spi_intranet of which dpnmwin is an existing one of a long time ago and which I can not touch its structur...
asked by 01.06.2018 / 17:00
4
answers

Define an array with default values in PHP

Is there a simplified way to define an array and set it to default values? For now I have the following: $arrData = []; for($i=0; $i<20; ++$i) $arrData[] = 0; Any ideas? I know that in Java and C ++ you can but in PHP I do not know.    ...
asked by 06.06.2018 / 17:10
3
answers

Syntax error, unexpected 'if' (T_IF) [closed]

When I try to run my page, I get this error:    Parse error: syntax error, unexpected 'if' (T_IF) in   C: \ xampp \ htdocs \ Login18 \ Login \ vista \ admin.php on line 143 <form method="POST" action="<?php echo $_SERVER["PHP_...
asked by 04.06.2018 / 13:05
2
answers

Error in PHP Array to string conversion

I'm trying to get an id from a database but the following error has come up: Array to string conversion My code is as follows: <?php require 'funciones.php'; $pwd=md5('pwd'); $respuesta = funciones::login('user', $pwd); if ($respuesta)...
asked by 23.02.2018 / 21:04