Posts by hamboldt • 663 points
21 posts
-
2
votes3
answers55998
viewsA: Run php function with onclick
If possible, you should create the routine in Javascript, but if there is no other way, you should run the PHP function in two ways: to) Creating a PHP file that runs the function, and when the…
-
1
votes1
answer380
viewsA: Generate Pie Chart with PHP javascript
To generate the charts just use the Chart.js Library http://www.chartjs.org/docs/#doughnut-pie-Chart…
-
3
votes3
answers1195
viewsA: Block Internet Explorer
In order not to lose the habit, try to use Frameworks like Bootstrap that work thinking about the compatibility issue, which does not make you have much work, and eventually deal with these boring…
-
2
votes1
answer373
viewsQ: Resolve caches using PHP
I Googled, but I didn’t find anything satisfactory for my needs. I wonder if anyone knows any solution to solve Blanks like this one using PHP. I have basic knowledge about Imagick and GD libraries,…
-
4
votes1
answer336
viewsA: How does how-old.net work?
Basically they calculate the angles of people’s facial features in order to determine the pattern of wrinkles and other traits, and based on that think about the age of the person. You can see below…
-
3
votes2
answers981
viewsA: Pass each result of an array to a variable
What you can do is use the function Extract of PHP. This function treats keys as variable names and values with variable values. For each key/value pair it creates a variable in the current symbol…
-
3
votes3
answers2883
views -
1
votes2
answers757
viewsA: MVC PHP - Libraries - Directory Structure
In cases like this the organization is made as follows: /vendors/Company/Library/Company/PackageName. If your code is generic and can be reused in other projects without much need for adaptation,…
-
2
votes1
answer910
viewsA: Limit jQuery checkbox
Well, you can count the number of checkboxes marked using jQuery and then compare with the set limit value and block the user action as follows. $(document).on('click', '.limited', function(){ var…
-
1
votes4
answers454
viewsA: How to generate a summary or excerpt of each post?
A simple way is to summarize the text and then convert to a friendly url. $texto = "codepad is an online compiler/interpreter, and a simple collaboration tool.Paste your code below, and codepad will…
-
10
votes3
answers2583
viewsA: include, require inside functions methods
There is no problem in making includes within functions, what changes is only the scope. If you do include inside the function, the scope of include is only inside that function, that is, it would…
-
2
votes2
answers2656
viewsA: PHP session does not work
Check if you have write permission in the tmp folder, or in another folder in which php is configured to save the session files; In any case, check the server’s php.ini settings and try to force…
-
1
votes2
answers93
viewsA: Insert null into a Doctrine relationship
I believe the problem can be solved with the configuration nullable=true in the Doctrine settings for your foreign key.
-
-1
votes4
answers781
viewsA: HTML/PHP Detect if form value has been changed
Since the username can be changed it is recommended that you identify the session by the database user ID, which would not create conflict if the same login is open in two different sessions, as the…
-
4
votes5
answers4587
viewsA: How to remove ddd from a number
$numero = 5198765432; $ddd = substr($numero, 0, 2); $numero = substr($numero, 2); var_dump($ddd); var_dump($numero);
-
0
votes2
answers2851
views -
2
votes1
answer176
viewsA: Masking for date field
Well, in HTML5 as long as the element has an ID, that element will be stored in a variable whose identifier is the ID that was defined in HTML. So within a property of this input you can define the…
-
4
votes3
answers4153
viewsA: Common encryption algorithm between Java and C#
Cryptographic processes like MD-5, AES, Base64, etc, work equally independently of the language that implements them. I have a project in C#. NET that can remedy, I believe, your problems in…
-
0
votes2
answers136
views -
2
votes1
answer589
viewsA: JSON cut when sending by post with AJAX
I’m not allowed to comment yet, so I’ll post an alternative anyway: well, I’ve had similar problems with cut transfers, and one of the main problems in this case is character encoding. For some…
-
2
votes3
answers7029
viewsA: Insert PHP into div with Jquery (.html)
Try using an application like firebug to thresh the transaction and check whether it is receiving the data correctly during the request made with jQuery. Try the following example: <script…