Questions tagged as 'php'

1
answer

Store content / variables in Model - PHP MVC

Hello, I'm starting to study the MVC standard for PHP. I have read several questions here in StackOverflow, I have already studied the Laravel documentation and read several articles. I chose the concept covered in this post as a basis -...
asked by 12.09.2016 / 03:32
1
answer

curl_init php does not work in friendly url?

I'm doing tests with curl_init php I happen to have the links like this: http://localhost/produto/novo Internally it accesses the new.php file, but I'm using htaccess to work with friendly URLs I need to make a file that will accept q...
asked by 14.09.2018 / 06:52
1
answer

server-side timer?

I'm doing a question game in PHP, the user will have 15 seconds to answer each question, how to prevent the user from changing the timer via inspect element and add seconds? Just adding details, it is impractical to let the user change the ti...
asked by 03.03.2016 / 20:26
3
answers

Error performing a database query

I'm using Zend and I have the following function: public function getChamado($id) { try { $cols = array( 'id', 'titulo', 'descricao', 'fk_status', 'fk_local', 'fk_tipo', 'created', 'modified', 'finished', 'fk_usuario',...
asked by 31.01.2014 / 00:09
1
answer

Connection Progress database by PHP (Laravel framework), PDO

I need to connect to a Progress database via php I'm using the laravel 5.2 framework but the same documentation supports only the MySQL, Postgres, SQLite and SQL Server databases. Searching I found very little about how to connect to this DB...
asked by 24.06.2016 / 16:04
2
answers

Calculate expiration date of the experience contract

I need to create a screen that automatically calculates the expiration dates of the experience agreement. The user types the start date and shows me the date the contract expires in case 45 days or 90 days. Could anyone give me a tip? Than...
asked by 08.09.2016 / 14:20
2
answers

Calculate days difference between two dates [PHP] [duplicate]

Good afternoon everyone! I did research before asking the question, but I did not get an answer for my doubt in any of them. I need help getting the following code to receive the two dates by the $ _GET variable, example (.php? data1 = 23-0...
asked by 23.09.2016 / 18:09
2
answers

Trigger in MySQL VS logic in PHP application?

I am doing stock control system, and I would like to know the advantages and disadvantages between two ways of implementation to do the subtraction of the number in the stock after a sale / exit. 1) Do a% direct update in the application t...
asked by 08.09.2016 / 15:29
4
answers

How do I round up on PHP?

What is PHP's function for rounding off excess? Example: 1.1 pass 2     
asked by 02.10.2015 / 16:00
1
answer

Run ECHO without interpreting HTML

I have a value in the mysql database that contains some html commands like:    <b>Olá</b>       <br>       Other ... I need to display the value using <?php echo $row_rs['original']; ?> to ap...
asked by 18.11.2015 / 18:47