Questions tagged as 'php'

1
answer

Update the database via input using ajax / php

I need to perform an update on a table in the database, reading the data entered in the input, by clicking the button. This is what I have so far: HTML: <td>ADSL</td> <td class="superdanger"> <input type="number" id="...
asked by 16.11.2016 / 14:57
1
answer

ERR_CONNECTION_TIMED_OUT ERR_CONNECTION_REFUSED [closed]

I'm developing a system that uses HTML, JS, PHP and MySQL. Pages have multiple AJAX calls to the bank. I have approximately 350 users today. Lately I've been getting a lot of errors from: ERR_CONNECTION_TIMED_OUT ERR_CONNECTIO...
asked by 09.11.2016 / 15:05
9
answers

How to prevent SQL injection in my PHP code?

I developed a page in PHP for internal use of the company I work with and only very few people use it. You can use this page to do some queries, insertions, changes and deletions of a table in a MySQL database, however I believe that my PHP code...
asked by 03.02.2014 / 13:37
1
answer

Dealing with nested objects (nesting) using an ORM

Let's assume that in a system for a bus company I have entities: Line, car and travel. Each has three classes: The entity itself, class Linha extends Model { protected $id; // outras propriedades. public function getId() {...
asked by 08.09.2016 / 05:15
2
answers

Problems with PHP PDO

Next, I have the following method in a class named UsuarioDAO . public function insertUser(PojoUser $user) { if ($stmt = Conn::con() != null) { $stmt = Conn::con()->prepare('INSERT INTO usuario (email, username, passwor...
asked by 27.08.2016 / 17:48
1
answer

How to send multiple variables to another page and return in a div (JQuery)?

I'm trying to send data from one form to another page, and bring a graphic of it in a div with id="return", which is below the form. The form has the code, data1, data2, and store, but it appears that the variables are not being sent correctl...
asked by 01.06.2016 / 13:15
1
answer

Return error message for database queries with PHP

Is there any way to get error messages coming from the database when trying to run a Query with the PHP PDO? I have tried to put a try catch in the ->execute() method but the PDOException class does not capture anythin...
asked by 29.03.2016 / 22:42
1
answer

Error while running db: seed command

I'm studying laravel in version 5.2 and running the php artisan command db: seed returns the following error:    [InvalidArgumentException]     Unable to locate factory with name [default] [CodePub \ Models \ User]. <?php use Illumina...
asked by 24.03.2016 / 03:19
2
answers

Select with inner join with CakePHP

I have a problem some time ago regarding a project I'm developing in cakephp , my view can not read a select with < in> inner join table. Controller: public function initialize() { $posts = $this->Post...
asked by 24.11.2015 / 12:26
1
answer

Source code is displayed on screen and does not run

A code of mine gave me a problem and a few excerpts from it appeared on a blank screen when I ran: Thecodewasright,Ididnotknowwhattheproblemwas,soIwenttotestanothercodethatafewdaysagohadworkedperfectly(Ididnotmodifyitinanyway,Ididnotevenopent...
asked by 28.04.2015 / 01:58