Questions tagged as 'php'

1
answer

Problem inserting the data array for google maps bookmarks

I have a table html that is created with a php calling the database Example: <table> <tr> <th>id</th> <th>Name</th> </tr> <?php $query = "select id, name from pizza"; $result = $con...
asked by 24.06.2017 / 19:23
1
answer

Create a Facade Laravel 5.4

I am new using laravel and what I want to do to incorporate into my project a class of my own that I have developed. I tried to follow the steps of this link but it does not work out, what I done so far is the following: 1.) Create the...
asked by 05.07.2017 / 20:23
1
answer

Error when making a query with PDO

   Fatal error: Uncaught PDOException: SQLSTATE [42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' inventory...
asked by 31.08.2017 / 17:35
1
answer

Error connecting to the BDD through a class

I am using a class that a user provided me with in a question that I published some time ago. The fact is that through this class I can make the connection to the database and make queries, etc. I was doing a connection test when when exec...
asked by 31.08.2017 / 08:05
2
answers

How to make an increase to an amount after the payment date has expired?

Greetings guys, I pose my problem: I must make an increase of 15% to an amount after 5 days of the date on which the person had to pay. A practical example is: Current Date: 08-30-2017 Payment Date: 08-25-2017 Total = amount + (amount * 0....
asked by 30.08.2017 / 15:59
1
answer

Mocks vs Stubs in PHPUnit

How can I differentiate in PHPUnit a Stub from a Mock. The Stubs verify status, and only dedicate themselves to returning specific answers when called. The PHPUnit documentation on this is clear and the example is very illustrative: //...
asked by 30.08.2017 / 18:30
1
answer

Duplicate records

I have a Ticket system, the code works 90% considering the requirements of the system, the problem is that sometimes when I make a record, it is duplicated. I have tried several things without success, it is clear that I can not have unique f...
asked by 30.08.2017 / 22:59
1
answer

Delete a row from a single table by doing INNER JOIN from several tables

I have the following tables: users : +----------------+-----------------+------+-----+-------------------+-----------------------------+ | Field | Type | Null | Key | Default | Extra | +-...
asked by 27.06.2017 / 19:53
3
answers

Keep the countdown in Forms

I have the following code, which puts a chronometer in countdown and sends the form the data you have to the BD but the problem is that the users to update the web page, the timer returns after 2 minutes. There is some way for the relog to keep...
asked by 26.06.2017 / 18:05
1
answer

How can I avoid XSS and CRFS attacks on my php page with angularjs? [closed]

On my website I want to avoid these types of attacks, I need your help because I do not know how to mitigate html injections or other ways to change the html to make requests by dea. It should be noted that the web service was created with ph...
asked by 27.06.2017 / 23:01