Posts by Thalles Daniel • 782 points
28 posts
-
1
votes1
answer1783
viewsQ: Possibility to view doc,docx in the browser
Is there a library that can view documents (doc,docx) to be viewed in the browser on an intranet without needing external resources like google Docs or office live? I need some component that…
-
1
votes3
answers191
viewsA: How to display the date in the input after the query
As your goal and present the dates after the query you can recover these data by the post variable as shown below. If you doubt a var_dump($_POST) and you will see the whole post you did <?php…
-
1
votes1
answer79
viewsQ: Construction of workflow project
I’m building a system where I need to record drives and display them to certain users as well as the progress of the process. Follow an example: Dep- Departamento. Equipe- pertence ao departamento.…
-
-2
votes3
answers493
viewsQ: Is it bad practice to fill <select> <option></option> with data from the database?
It would be bad practice to use selects of HTML with items obtained through a database, even though they are dynamic (always occurring addition in the table that contain them). Example without a…
-
1
votes2
answers376
viewsQ: Static method calling an object
Because PHP allows me to use it like this, as below, the script runs normally. Wouldn’t it be incorrect? Or not? The aperador :: Isn’t it just for static methods? I was trying to access an object by…
-
0
votes1
answer199
viewsA: I’m trying to make a log system in PHP/Javascript
A solution in php //Recupera o IP real function getIp() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ip =…
-
0
votes0
answers309
viewsQ: Class display php image
There is the possibility to display an image through class methods without needing an external file to not generate header conflict? I created a class where to depend I call an image in a protected…
-
9
votes2
answers18476
viewsQ: optimized way to recover last mysql ID
Which is the most optimized way to recover the last table id? I tested these two methods and the orde by took a long time. There is some beyond these? Note: nãp will be a query after Insert. It will…
-
1
votes0
answers118
viewsQ: Access to different department modules
I have a question about building a small project. A user has access to a department module, so far so good. My question is if the user needs to access another module of the same department. Login is…
-
1
votes1
answer53
viewsQ: Problem with library switchery
I put this library switchery in my project, I can capture the checkbox change event, but not make sure that if the post goes wrong it returns to unchecked.…
jqueryasked Thalles Daniel 782 -
1
votes1
answer1512
viewsQ: Relationship (0.1) in mysql Workbench
I’m doing a project and I started by modeling the bank was all right up to the point of users that I got confused. Rules: general admin (access to all), admin company(access to all company events)…
-
0
votes1
answer27
viewsQ: Doubt with column Bank
I received a mysql dump for study and I was doubtful in a certain text column with the fields filled in this way: 'a:5:{ s:9:\"user_data\"; s:0:\"\"; s:4:\"nome\"; s:5:\"admin\"; s:2:\"id\";…
mysqlasked Thalles Daniel 782 -
1
votes1
answer114
viewsQ: Bank related creation
I am doubtful whether or not I am doing the right thing in setting up this bank. They could help if the way is right or wrong. For now I just put id in the tables. Gang Turma | Turmaid A 1 B 2 C 3 D…
-
2
votes1
answer724
viewsA: php session time
In the login script you put: $_SESSION["sessiontime"] = time()+360; #caso queira um tempo mais so fazer as contas em segundos This script I put in a include that every page the user accesses it…
phpanswered Thalles Daniel 782 -
2
votes1
answer666
viewsA: Session variable "balance" does not update
##########login.php############## <?php include('init.php'); session_start(); //CONSULTA DO UTILIZADOR $consulta="Select * from login where username='" .…
-
7
votes3
answers22400
viewsA: What is the difference between bindParam and bindValue?
Look at this SELECT what use, at least here is a real and commonly used example, as requested: The bindParam always use with variareis if using a value type 'username' in place of the variable will…
-
2
votes1
answer5123
viewsA: Delete image from BD and server destination folder
Why instead of using delete not use update? $delcheck = mysql_query("UPDATE topo SET logo="" WHERE logo = '$logo'") or die (mysql_error()); unlink($pasta_imgs.'/'.$logo); There it will leave empty…
-
0
votes1
answer48
viewsA: Image is being uploaded without extension
Try to use it like this: $path = "../content/img/".$post_id.".".$ext[count($ext)-1]; # o -1 dentro do índice assim ele diminui com o count da variável. Or: $path =…
-
5
votes0
answers76
viewsQ: Method to protect IIS from hotlinking
There is some efficient method against hotlinking pro IIS. I tried two but they did not work. <!--Método 1--> <rewrite> <rules> <rule name="Blacklist block"…
-
3
votes2
answers1314
viewsQ: Note Field Mask - 10 or 5.5
I’m looking for a script on jQuery to make a mask: When I’m through with you 10, the field format to 10,0 and when it’s another note like 6,5 leave like this. As an example below. I need you to…
-
1
votes2
answers1222
viewsA: Pass input value to another page
I had a similar problem I brought from the database, data by a submit_1 to a table and if it had 50% filled would need to take the id and make another submit_2 on the same page. Then I ended up…
phpanswered Thalles Daniel 782 -
3
votes2
answers2157
viewsA: Add value to a checkbox Instantly
See this code if it helps you: <? $variavel = 100; ?> <html> <head> <script src="http://code.jquery.com/jquery-latest.min.js"></script> </head> <body>…
-
0
votes4
answers835
viewsA: Load page with Jquery event
I got it this way: $('#SEN').on('onload, change',function() { if (this.checked == true) { $("#abre").show(); } }).trigger("change");
-
2
votes1
answer151
viewsA: Randomize according to a radio button
Look at it this way: <html> <head> <meta charset="UTF-8"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> </head>…
phpanswered Thalles Daniel 782 -
3
votes2
answers2064
viewsA: Calculate logged in time - PHP
My System for checking logged in user I put in the include header this jquery <script type="text/javascript"> function insereLog() { $.ajax({ url: "funcoes.php?acao=log" }); }…
phpanswered Thalles Daniel 782 -
3
votes4
answers835
viewsQ: Load page with Jquery event
need a help. There’s a jQuery event that works the way I want it to. When I click, it executes the action. $("#SEN").click(function(){ $("#abre").show(); //ou fadeIn }); My intention is that, on…
-
1
votes2
answers2064
viewsA: Calculate logged in time - PHP
Saves the date the user entered the system into a table and the time it exits. In mysql use NOW() to bring the current time, if the time zone has different use DATE_ADD( NOW( ) , INTERVAL +3 HOUR ).…
phpanswered Thalles Daniel 782 -
3
votes1
answer48
viewsQ: Print form with: 1.photo in the post 2. id auto increment generated in the form Insert. How is it in PHP?
At the time of registration of the form the user will put the photo, so far so good. My problem is that I need to print this form already with the photo and the id auto increment of the database.…