Posts by Dante • 172 points
17 posts
-
0
votes1
answer472
viewsQ: Update v-for in Vue.js
Hey guys, I’m having a slight problem here on my Vue.js. I have a variable user.activeItems, in HTML I give a v-for on this variable, to show the active items, as follows: <div…
-
0
votes1
answer19
viewsA: Problems with entering and receiving Mysql values with Codeigniter
Buddy, you’ve got it all wrong. Not is for you to create a connection PDO within a model! You have to use the Codeigniter database connection, to see how it configures you can see in this link:…
-
0
votes1
answer38
viewsA: Warning error: include PHP
Using ../, you’re trying to give include() in a folder previous to the game.php, to give include in a file from the root directory of your project you use ./ or if you wanted to give a include from…
-
0
votes2
answers215
viewsA: How to turn JSON_ENCODE from PHP to JSON in javascript
You’re probably doing this in your PHP code: var_dump($variavel); What you need to do is: echo $variavel;
-
1
votes1
answer63
viewsA: Error Function to return Alert
You have to make a check if the input was left blank, you can do with the following styles: Checks whether the input was sent, if not from echo 0;: if(!isset($input)) { echo 0; } Checks whether the…
-
1
votes1
answer91
viewsA: Unable to load requested file: products / list_table.php
Hello, one of the possible reasons would be that you have typed the wrong file, check again if all the names are right. Another reason, is that as far as I know, codeigniter only looks for views…
-
0
votes1
answer56
viewsA: Treating array with php to Laravel
It’s very simple friend, just you select the items this way: $btc_rate_btc = $array['BTC']['rate_btc']; $btc_tx_fee = $array['BTC']['tx_fee']; $btc_name = $array['BTC']['name']; $ltc_rate_btc =…
-
1
votes1
answer335
viewsA: Redirect with Curl
You need to set the CURL parameter, where it allows it to follow redirects: curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); Since you wanted to limit redirects you can use this parameter:…
-
0
votes1
answer21
viewsA: Realtimedatabase Read data via Java Script
You can use Jquery to do this, with the following code: $.each(snapshot.val().id, function(index, element) { console.log(element); }); You can read the documentation of this function here:…
-
1
votes1
answer616
viewsQ: Insert Component after rendering Vue.js
Hi, I’m learning how to use Vue.js and so far I’m learning how to create Components. However I am as a difficulty, I want to render a component after loading the page. I in my project will call…
-
0
votes2
answers225
viewsQ: How to use preg_match() to catch a link within a Javascript code
Hello, I’m making one file_get_contents() in PHP and getting a JS, in this javascript has a code where it contains: $("#download-botao").attr("href", "link.com"); I’m wanting to get this link.com in…
-
-1
votes1
answer153
viewsQ: Winning percentage in PHP
Hello, I am creating a system of items on my website. Each item has a certain chance to win. For example, 0.01% I would like to know how to make PHP every time the user plays, try to win some item…
-
-2
votes1
answer483
views -
2
votes2
answers273
views -
1
votes2
answers867
viewsQ: How can I echo a JSON in PHP?
Look I’m doing some tests with an api where I’m getting this json: [ { "id": "bitcoin", "name": "Bitcoin", "symbol": "BTC", "rank": "1", "price_usd": "18880.8", "price_btc": "1.0", "24h_volume_usd":…
-
1
votes3
answers63
viewsQ: How to specify a maximum of digits in a var in Javascript
I’m with a Javascript code from an API where I’m getting a number with enough digits after the point: 39.576911261669586 I wanted to assign this number to a variable showing only 4 digits, this way:…
-
0
votes1
answer81
viewsQ: How can I make a log box always show the last line?
hi, I have a log file of other codes that keeps updating so I made a javascript code that shows this file and is a code that keeps updating the live text on the page inside a textarea but it keeps…