Posts by Daniel • 759 points
39 posts
-
1
votes2
answers2110
viewsA: How to implement the Gentelella Bootstrap Admin theme?
So, remembering your knowledge of HTML: you remember that inside the element <head> you reference the files CSS that you will use on your site to change the appearance of the elements html,…
-
0
votes1
answer164
viewsA: Help with Checkin and Checkout logic
Trying to help you there, as you asked in the comments, but honestly I’m trying to figure out what the difficulty is. function salvarCheckin() { $db = open_database(); if…
-
1
votes1
answer288
viewsA: HTML/Php how to change the content of the page according to the inserted end
You can only use the $_GET address variables. Following your example (I fixed the tab ; for &: www.site.com.br/Player.php?video=video.mp4&img=img.png You have two attributes, "video" and…
-
0
votes1
answer278
viewsA: How to install non-terminal version 6.10.3 of nodejs
The repositories are outdated, they explain that one should use Curl here. Then download the package directly from them and have it installed. You have two other options: compile the source code…
-
1
votes3
answers597
viewsA: Contar while php mysql
To count lines in Mysql: SELECT COUNT(*) FROM visualizacoes_telefone WHERE auxiliar_fornecedor = $auxiliar
-
1
votes3
answers2558
viewsA: How to align a text in the middle of the height of an image?
Usually you will use the display: table-cell in the box where you want to style the vertical position of the text and then use the vertical-align: middle, but then you need to set a height for that…
-
0
votes1
answer583
viewsA: Take database specific data
Firstly: never, never, never, never, never, never put raw variables in your database queries. Never. Never. That’s asking to have your system hacked by children. Use this function to avoid this…
-
1
votes2
answers768
viewsA: What is the best way to generate tables dynamically in php?
Let’s say I have several tables in my database, each with a different structure. Whereas I have data(lines) in all of them, you can do the following: <?php $dados; // essa variável tem um array…
-
0
votes1
answer82
viewsA: Return in XML PHP - Source FORM
I think you want to put the XML header, if not PHP returns HTML by default. header('Content-type: application/xml'); More about the function header…
-
2
votes3
answers2135
viewsA: Put the options of an input select in a variable
So, <select multiple /> has an attribute called selectedOptions that returns the <option /> chosen. Then just go through them at the event onChange same. With pure Javascript gets like…
-
1
votes1
answer102
viewsA: What microframework should I use?
So, just a quick Google search for php microframework you already think of face the following: Lumen, which is based on the Laravel Silex, which uses Symfony components Slim Flight None of these I…
-
1
votes1
answer179
viewsA: How can I not type more than 10 characters with WYSIWYG?
The summernote has several callback functions in his documentation. Among them, the onKeyup. So, just include this callback when starting the object: $('#summernote').summernote({ callbacks: {…
-
3
votes3
answers1306
viewsA: Diagram of class MVC
The controller should not extend the model. The controller is at the request level (GET, POST, PUT etc...) and the model is concerned about data persistence (databases, usually). Here in the OS I…
-
1
votes1
answer1113
viewsA: Upload html and save to Google drive
In PHP you can manipulate the files that the user climbs up to the server using the function move_uploaded_file. With it, you move the file somewhere on your server and then use the Google Drive API…
-
0
votes1
answer83
viewsA: Progress bar with Jquery counting negative
My idea: you save the first value that comes to the server as current value and use it as your 0. $(Function() { var bar = $('.bar'); var Percent = $('.Percent'); var status = $('#status'); var…
-
1
votes2
answers484
viewsA: How to know if user is logged in with ion-auth 2
So the problem you want to solve is that the same user cannot be logged into two "machines" at the same time. Using normal sessions, which stay on the server - either in memory or in the database -…
-
0
votes1
answer46
viewsA: How can I pass more than one point to google maps in that while?
You are generating multiple maps with this code, all of them overwrite the last, so you are only returning the last point. Your loop should be after var map = new…
-
0
votes1
answer74
viewsA: How to upload by FTP instead of HTTP
Dude, put an attribute name us inputs that follows a pattern. For example: <input type="file" name="arquivo_1" /> <input type="file" name="arquivo_2" /> <input type="file"…
-
1
votes1
answer306
viewsA: Quantity of products to be differentiated in the shopping cart
From what I understand you are storing in the database the status of each customer’s cart, correct? You need to include in HTML the primary key of the purchase and pass it on Ajax that you are…
-
0
votes2
answers484
viewsA: How to know if user is logged in with ion-auth 2
Consulting to documentation ion_auth you can see that has a method logged_in() from the library itself. Returns TRUE if you are logged in.…
-
2
votes2
answers3657
viewsA: ERR_CONNECTION_REFUSED - Why can’t your phone find the absolute path of files through localhost?
First: don’t use file_get_contents, or use include or require. The relative and absolute paths are always based on what you defined when setting up your server. In Apache, you can set the path to…
-
3
votes2
answers292
viewsA: How to render Children in React?
The object Children de props is not a collection of nodes of Virtual DOM, then he can’t print them. The problem is I don’t quite understand what you were trying to do...…
-
2
votes1
answer1298
viewsA: How to send 2 arrays/parameters through the url?
Two things: Avoid passing this type of purchase data by GET, use the method POST. Besides being safer, there’s a limit on the amount of characters you can pass through GET 2083 characters. It seems…
-
1
votes2
answers579
viewsA: Reliability and Security of Sessions
You do not have an authentication solution that does not use cookies. PHP Session is a cookie in the browser that is stored on PHPSESSID. Then PHP creates a data structure matching the session value…
-
-2
votes3
answers421
viewsA: To observe an error in the iframe element with "sandbox" attribute
If Try catch doesn’t work, you can try using a regex on the string before turning Markdown looking for the tag script and pulling out.
-
1
votes1
answer756
viewsA: Change radio input checked by Jquery
To do a task that repeats itself at constant intervals, you can use the setInterval. There is an example below, just to give a real idea, but I advise you to read the following links: First, to…
-
0
votes1
answer227
viewsA: Start Laravel with Webserver
To run a script while starting Ubuntu, you can use a cronjob (there are other ways, this I find easier). To do this, create a file with the command you want, and put the extension .sh. In case, you…
-
1
votes1
answer263
viewsA: Javascript counter for php controller
You can only include the value of the counter in a hidden field and use this, no? <input type="hidden" id="inputContador" name="contador"> So instead of just increasing the variable, you use a…
-
0
votes1
answer916
viewsA: How to print to non tax printer by tablet
You want to make your server print the document, right? The simplest solution I know is to use a headless browser - like the Phantomjs and have him access the page and print. However, I think this…
-
1
votes2
answers1013
viewsA: How to write data from a form to a database by converting the fields to JSON?
Only use the function json_encode($_POST) Documentation of json_enconde function Recalling that, according to the documentation, the function jason_encode() does not change the array you pass to it,…
-
1
votes1
answer345
viewsA: Use require or directly call the *.php file
The default nowadays is to use friendly URL (site.com/nome_da_secao/nome_do_recurso). To do this, it is similar to what you are doing: all addresses access a starting point (index.php) and it…
-
1
votes1
answer598
viewsA: Write Hmtl Table data to Database | Laravel 5.1
You will have to do an ajax for each row included in that table there. To do this, use a selector for the table rows: $('#table-list-exames tr') and then just use the each from jQuery to get the…
-
0
votes2
answers1302
viewsA: call php function in c#
According to what I searched, in C# you can execute whatever you want on the command line as follows: string strCmdText; strCmdText= "/C copy /b Image1.jpg + Archive.rar Image2.jpg";…
-
1
votes2
answers209
viewsA: When triggering an event in an array element (with querySelectAll) trigger only one element of another array (also with querySelectAll)
Your main mistake is that you are passing the array with all the elements when changing their style, you want to change the element itself, the this. var cresce = function() { this.style.fontSize =…
-
2
votes2
answers1720
viewsA: PHP Fatal error: Uncaught Error: Class 'Sqlite3' not found in /var/www/html/
You have activated the sqlite3 module in Ubuntu PHP7? To activate, just go to the server and type in the console: sudo apt-get update sudo apt-get install php7.0-sqlite3 See if it solves, if it…
-
1
votes1
answer482
viewsA: Form, PHP and MYSQL - mysqli_num_rows always equal to zero
Dude, first of all, never ever pass a direct form string in the query like that. The correct way, using mysqli is as follows: $stmt = $dbConnection->prepare('SELECT * FROM employees WHERE name =…
-
0
votes1
answer34
viewsA: Request jquery giving error
When you run jQuery there at the beginning, it finds all Divs with "response" class and applies the events you programmed into the response function, right? Only when you upload more comments, it…
-
2
votes1
answer54
viewsA: Is there any way to include the Wordpress header in an external page I created?
I think you will get more work doing this than just making a page in Wordpress and setting it as a home page. Why WP does several things before including the header on the site (connects to the…
-
0
votes2
answers1585
viewsA: Load Iframe Target into a new Main Window Tab
Man, just to be sure: have you ever tried changing the target of the form inside the iframe to "_Blank"? It would look like this: <form class="form-signin" action="validacao.php" method="post"…