Posts by Randson • 213 points
8 posts
-
1
votes2
answers222
viewsA: What is the difference between this and var within a Javascript class?
The operator this will always catch the parent operator. If the parent is not set by default it will be the object window. The var, as its name already indicates, it is a variable. However it can…
-
2
votes1
answer165
viewsQ: Set Sublime Text custom block 3
I would like to create a custom block, almost as the comment creates. The small difference is that it will be adapted to my need, example: It has a standard CSS code, it automatically when I create…
-
6
votes2
answers24272
viewsA: How to resolve "Cannot Modify header information - headers already sent by" error in PHP?
In fact, it is not a mistake. It is a warning(Warning). This is done when your browser requests the web server. With the response from the web server. It gives you a response header(header). This…
-
2
votes3
answers267
viewsA: Have some problem playing the function for variable
Marcelo, this is one of the ways to declare methods in javascript. Example: var myvar = function() { return true; } Besides that way, there’s this: function myfunc() { return true; } As well as this…
-
0
votes5
answers491
viewsA: Product search by name and brand
You can use the SQL LIKE operator. Depending on how your tables look. I’ll show you an example of how to do with PHP PDO: public function get_product( $product_name ) { $sql = "SELECT * FROM produto…
-
3
votes3
answers81
viewsA: Order of posts when consulting the database of my CMS
You are using which CMS. As you are showing. Your query should look like this if you are using PHP PDO: public function fetch_all() { $sql = "SELECT * FROM mytable"; $stmt = Connection::prepare(…
-
0
votes1
answer282
viewsA: Video API - How to automatically update your posts?
Yes, it has its own Youtube API. It is available at this link: https://developers.google.com/youtube/? hl=en I did one of these on Rede TV Rondônia. It was like this: function showVideosShopTV( data…
-
4
votes2
answers269
viewsQ: Form php takes different value than typed
I have a PHP form. When I give Submit it should take the values coming for $_POST. But it turns out that the returned data comes only value 1. I don’t know what’s going on. Everything seems normal.…