Questions tagged as 'php'

1
answer

UPDATE without changing the date of a record

How do I change a record in my table and keep the date the record was created. In% with% I'm using the INSERT method. When I use a now() to change only one column the date is being changed, and I need to keep the date the record...
asked by 03.04.2017 / 08:48
1
answer

Get filename that has no extension using foreach (glob ())

How to get only files without extension? examples 1bdfe4baf9061c3667ded70d8f66142c 2a0daf2d8d5b7ea1813c7a84b146d092 91e3b288eab8d59598a52221296f8995 $f=glob("*"); foreach ($f as $arquivo) { echo "$arquivo<br>"; } //Neste...
asked by 09.09.2016 / 07:15
1
answer

Laravel - Return HTML or JSON in same Method

I'm starting with Laravel, seeing from the rails, where to return a JSON I simply put .json in the url, obviously the return handling is on the Controller. My question is how to do something like Laravel. I would like, instead of creating a m...
asked by 13.03.2016 / 21:21
2
answers

Catch All Records and Separate by Status

Dealer.php class Dealer extends Model { # Relacionamento com Medalhas public function dealer_medalhas(){ return $this->hasMany('App\DealerMedal', 'id_concessionaria'); } } DealerMedal.php class DealerMedal extends...
asked by 15.03.2016 / 20:31
1
answer

Error converting mysql_list_tables to mysqli_

I have a page to download a backup of the MySQL information, but it is giving the following error since I started migrating from mysql_ to mysqli_ :    Fatal error: Can not use object of type mysqli as array in /home/.../public_h...
asked by 19.03.2016 / 20:14
2
answers

Print the next days after the 18/01/2016

I have to make a code where I put a date and I need to know what the next 5 days are. For example, today is 18/01/2016 the next few days are 19/01/2016, 20/01/2016, 21/01/2016, 01/22/2016 and 23 / 01/2016 . I need to pick up the next 5 days o...
asked by 19.01.2016 / 02:08
1
answer

Doubt with checkbox and PHP

I have 2 fields, as below, which are checkboxes : <tr> <td>Dizeres Legais:</td> <td><input type="checkbox" name="export_dizeres[]" value="PORTUGUES"> Português...
asked by 08.01.2016 / 19:33
1
answer

Show Loading Image in the Middle of the Screen

I have a form and typing the zip code shows a loading gif while I load the street, the neighborhood and etc. The problem is that as the user goes down the form, the loading gif does not appear because it gets stuck at the top of the form givi...
asked by 12.01.2016 / 19:11
2
answers

How to highlight a row in the query result php + sql

I'm developing an Application that uses a page PHP where I will have a ranking of points that the user makes when performing some interaction with it. I have a script that generates the list in order (from highest to lowest) showing from...
asked by 05.01.2016 / 20:13
1
answer

Protecting the form from intrusion

What is the effective way to protect the form from intrusion? I use the following code to filter out some types of intrusions: function anti_injection($sql) { $sql = preg_replace(sql_regcase("/(from|select|insert|delete|where|drop table|s...
asked by 13.01.2016 / 18:25