Questions tagged as 'php'

4
answers

How to use Try Catch in an insert

How do I use a try catch to return me an error from an insert that was not inserted into the database. For example $sql = $pdo->prepare("INSERT INTO usuarios (nome,email,senha,telefone) VALUES (:nome,:email,:senha,:telefone)"); $sql->...
asked by 28.06.2018 / 22:14
2
answers

Block user access with foreign IP's

Is it possible to restrict access to a particular site or Web system, so that only Brazilian IP's can access it? I have a mini-system in PHP, and to further enhance your security, I'd like to make it inaccessible to all types of foreign acces...
asked by 15.05.2018 / 03:59
3
answers

Generate Excel with query php

I need some help. I have a query in php and mysql and I would like to add to this query the option to export the data also to excel. Is it possible to do this with php? <div id="tabs"> <ul> <li><a href="#tabs-1">Inf...
asked by 26.05.2014 / 18:20
2
answers

JQuery DataTables - Number of Paging Numbers

I'm implementing DataTables pagination and I could not figure out how to change the number of paging number buttons. As you can see, we have 1 a 5 , or we could have 7 a 11 numbers of the Page, that is, always 5 numbers . I would...
asked by 10.06.2014 / 19:20
2
answers

How to disable Godaddy server cache?

I have a problem with server caching on Godaddy. I do not know if this is with all Godaddy clients with shared server or just with my account. It turns out that I make changes to a file and upload it, but the change is only reflected after a...
asked by 23.05.2014 / 06:05
3
answers

I need to list a text field with values separated by;

I have a text field that is being inserted into the same phones in this format: 11 2222-3333;12 9 1111-2222;18 1111-2222;11 2222-3333 I need to list these fields as if it were a simple select in line and column . the result...
asked by 13.06.2014 / 04:26
2
answers

.txt import for MySQL - values between strings

I have a TXT file that contains several different records, in some cases I need to get the information that is between 2 strings, eg Cliente: FULANO DE TAL CPF: I need it to be between Cliente: e CPF: . In other parts of the same...
asked by 15.06.2014 / 20:47
1
answer

Next value in a random order of numbers

I'm trying to create a NEXT button, this Next will show the next content, all of which are stored in the database and all have an ID. Everything would be very simple if the IDs were sequential type 1 2 3 4 5 6 7, but it is not ... And that's...
asked by 22.05.2014 / 19:31
1
answer

Writing PHP code without special characters

Is there a way to print special characters in PHP using just the code with ascii characters? For example, in javascript we can use \ u00e1 in the middle of the text. In Java, we can use \ u2202 for example. What about PHP? How can I use it...
asked by 23.04.2018 / 23:18
1
answer

Check current date automatically

I'm developing a system with PHP where: I've made available a contest entry page for staff, but this page has an end time, example: The page will be available from today 05/08/18: 17:11 and will disappear on 09/05/18 23:59:00. I know I ca...
asked by 08.05.2018 / 22:16