Questions tagged as 'php'

2
answers

How to damage a website using XSS / SQL injection?

I'm not a hacker, but I know some techniques. I'm training security and I was really thoughtful about it. Every time I inject a script, it is a alert() , nothing dangerous for the host (for example). I do not have a website, there is no wa...
asked by 21.06.2014 / 05:06
2
answers

Do not register in the time zone if it already exists

How do not register events in the time zone that is already registered? Example: I have an event in the DB beginning at 18:00 and ending at 22:00, I need that if the user tries to register a new event from 19:00 to 23:00 the system do not a...
asked by 24.08.2014 / 00:23
2
answers

What is the difference between SSE and Ajax?

I want to update a div that contains the credits of a client, as soon as I update the amount of credits in the Bank and I'm using setInterval : setInterval(function(){ ver_creditos(); }, 60000); Then I saw the function of...
asked by 07.06.2017 / 02:15
3
answers

Is it necessary to use the third bind * parameter?

I would like to know if I should use the third value of bindValue() / bindParam() ? For example: $resultSQL->bindValue(1, $email, PDO::PARAM_STR); Or there's no need for me to use: $resultSQL->bindValue(1, $email);...
asked by 14.03.2017 / 13:53
2
answers

Change storage location in laravel 5.4

The current storage location for laravel is / laravel / storage / app / public . How do I switch to / laravel / public . I tried editing filesystems.php but I was not successful: Controller store function: public function store(Request $r...
asked by 17.02.2017 / 17:56
3
answers

How to know which word is the most used in all registers

I'm doing a top trendig system, however I'm very confused: How do I make the select pull only the 10 most used words in all registers. However, the words are in a column and separated by a comma. NOTE: I'm using PHP 5.3 Tabela posts Estr...
asked by 13.07.2017 / 08:03
3
answers

How to group mysql results by foreign keys into a single array through a single query?

Let's say I have 2 tables, one with phone numbers, and one with sectors: Ex :. tb_ramais: id, extension, group_id (fk). id | ramal | grupo_id 01 | 1234 | 01 02 | 2345 | 01 03 | 3456 | 02 04 | 3457 | 02 tb_groups: id, sector, manager....
asked by 19.05.2014 / 19:55
2
answers

Check total records in Laravel

In certain part of my application written in Laravel I have this query: $counts = User::select(\DB::raw('count(*) as status_count, status')) ->groupBy('status') ->get(); It returns me at least 1...
asked by 23.06.2016 / 06:23
2
answers

Creating string in PHP

Is it possible to create in PHP a variable of type string that contains so many bytes , that is, defined by the programmer? Example in C: char string[20]; In this case, string will always have 20 bytes, regardless of what is stor...
asked by 29.07.2015 / 14:34
2
answers

Force text download in MSWord-supported format with PHP?

I would like to know how to force the download of a file, with some extension supported by Microsoft Word p> I've searched a few times, tested the MIME types I found, like the ones in this Microsoft's list , but I did not succeed. This...
asked by 11.09.2015 / 07:13