Posts by Thiago • 2,866 points
149 posts
- 
		1 votes2 answers437 viewsQ: Send form only if any input changesI have a form that opens in a bootstrap modal that is filled dynamically with jquery, this form is enabled for editing, and in this modal has a button "Save changes", I want you to perform an action… 
- 
		0 votes1 answer86 viewsQ: htaccess file giving ForbiddenI’m wearing the Uniform S erver, which is a portable server, and already has mod_rewrite active and even then my htaccess file returns Forbidden. filing cabinet: RewriteEngine on RewriteCond… 
- 
		2 votes1 answer355 viewsQ: Get all data with the same id without knowing the idI have a table in the database with information that have the same ID, as if they were a set, I would like to get all the information with this ID, but I don’t have it, and I’m using a LIKE to… 
- 
		1 votes1 answer151 viewsQ: Capture all phones from a text fileI have a log records in html, and would like to capture all the phone numbers, both fixed and mobile that are scattered throughout the file, I use the following regular expression currently:… 
- 
		5 votes3 answers370 viewsQ: Sort phone numbers in a stringI have some phone numbers, mobile and fixed, in a database, I used the function implode()to join them together in the same string, getting that way: (11) 3333-4353 (11) 98000-2222 (11) 3027-5555… 
- 
		1 votes2 answers485 viewsQ: Find and remove words from multiple arraysI have some arrays that come from the database, and would like to remove word occurrences in them, for example the string in $title $title = "Eles foram com José procurar alguma coisa"; $bad_words =… 
- 
		0 votes2 answers68 viewsQ: Find term and capture text immediately or after spaceI have some payment logs and these are the patterns that they created the file: Standard 1 Apelido -- isso é um espaço Fulano de Tal Standard 2 Apelido: Fulano de Tal Standard 3 Apelido: Fulano de… 
- 
		1 votes1 answer794 viewsQ: Mysql auto timestamp insertionI am using the option ON UPDATE CURRRENT_TIMESTAMP, but the format that is updated in the table comes in this format: "2017-06-07 13:05:02", I wish it were in seconds like this: 1496851485, the most… 
- 
		0 votes3 answers605 viewsQ: Calling the same function twiceI am testing a function that opens pop-up for certain link, and would like to call it to 2 links then basically your call is like this: jsPopunder(URL); I tried to create an array with the Urls and… 
- 
		0 votes1 answer30 viewsQ: Insert data in specific part from a fileI’m using the base feed file from google, and need to change the information dynamically to generate an xml file, I am using this approach, with file_puts_contents(), to put the tags <item> in… 
- 
		0 votes0 answers304 viewsQ: capture html from an external page take table data and send via AjaxNext, how can I capture pure html from a page, for example "site.com.br/tabela_precos" this site has a return basically like this: <html> .... arquivos e configurações javascript .... outras… 
- 
		0 votes3 answers224 viewsQ: remove first array from an arrayI have the following array and would like to always remove the first array, how can I do that? Obs: there is the possibility that the first array may not always have index 0. Array ( [0] => Array… 
- 
		1 votes1 answer337 viewsQ: What is the most appropriate way to instantiate a database in an MVC standardI’m studying POO and a little bit about the MVC structure, and I’m wondering where to create and instantiate the database to be used in the entire application, thought as the Model relates to data… 
- 
		0 votes1 answer491 viewsQ: Take JSON information and insert into the loop html using getJsonNext, I have a table in an html page, example: <table> <tr> <th>nome</th> <th>e-mail</th> </tr> <tr> <td>Jill</td>… 
- 
		-1 votes2 answers212 viewsQ: Comparison between decimal numbersI have 2 posts on a table, with prices 500,00 and 88,98. When I run to sort according to the highest price, Mysql returns me that 88.98 is higher than 500.00, the "price" field is a string, because… 
- 
		2 votes1 answer31 viewsQ: Problem capturing string type with Altorouter routerI’m using Altorouter to make the page call of my project, and in his doc says that to use "Match Types" custom just add $router->addMatchTypes(array('cId' => '[a-zA-Z]{2}[0-9](?:_[0-9]++)?'));… 
- 
		0 votes0 answers226 viewsQ: Send emails in PHP backgroundI have a user registration system, and after the user has registered it is necessary to confirm the account in the email, the problem is that the page takes a little to load and this can generate a… 
- 
		2 votes2 answers4673 viewsQ: Hide/Show when checkbox is checked or uncheckedHow can I check if a checkbox field is checked, and according to its state, hide or show another input field, example: <label> <input type="checkbox" name="check" /> Clique aqui… 
- 
		1 votes1 answer1145 viewsQ: Phpmailer too slow to send emailsI’m using the PHPMailer on a Godaddy host, the sign-up page takes about 10~15 seconds just to send the email, is there any efficient way to optimize this? or is it a matter of server capacity?… 
- 
		0 votes0 answers379 viewsQ: Is there any way to make apache case insensitive on linux?I made the entire application using Windows,e é relatively grande, e em muitas partes do código esqueci das regras de case sensitive, como o windows ignora isso não pensei em mudar nada, except that… 
- 
		0 votes0 answers30 viewsQ: Web Fonts do not work when sending email with PhpmailerWhen I send an email using Phpmailer the fonts are not recognized by gmail, I was already aware of some problems with CSS and having user the inline css in the "style" tag, there is some way to… 
- 
		1 votes1 answer1885 viewsQ: Superimpose div on another and position in the upper right cornerHow can I overlap one div with another and always position it fixed in the upper right corner always in relation to the div that it is inserted? I tried with z-index e position:absolute but I did… 
- 
		0 votes1 answer647 viewsQ: Decode JSON return fasterThe System captures the user’s address through the ZIP code, I am using the Viacep, I do a front-end validation with jquery validate and a back-end with PHP, the validation with jquery takes the… 
- 
		0 votes1 answer276 viewsQ: Accept string with letters, numbers or dotsI’m using the Jquery Validate plugin to validate facebook usernames, and by default it can have letters, numbers and points. Ex: joao, joao22, joao.maluco22 How to validate this with jQuery… 
- 
		0 votes1 answer153 viewsQ: Problem with character decodingI’m using a function to limit the amount of characters that are displayed, something like this: function blabla ($string, $maxSize) { if (strlen($string) > $maxSize) $string = substr($string, 0,… 
- 
		0 votes0 answers43 viewsQ: Questions about redirecting with Location.replaceI am sending a form with AJAX and after sending, and the JSON return is positive, the user is redirected, I am using the method window.location.replace(redir_url), but I am still able to go back to… 
- 
		0 votes2 answers82 viewsQ: Validating Jquery Price Format Output MoneyI am using Jquery Price Format to format money using ,(vírgula) to separate pennies and the .(ponto) to separate thousands, leaving something like this: How can I validate this by only accepting… 
- 
		5 votes4 answers11013 viewsQ: Validate phone number with optional ninth digitHow to validate phone number with the optional ninth digit? in the following formats: DDD + 8 digits = (21) 9876-5432 DDD + 9 digits = (21) 98765-4321 
- 
		0 votes0 answers37 viewsQ: Optional ninth digit using Jquery Mask PluginHow can I make Jquery Mask Plugin formatting automatically fit the number of digits? for phones with 8 digits and/or 9 (optional), it looks like this: $(document).ready(function() {… 
- 
		1 votes1 answer2319 viewsQ: Get value from a specific input using AJAXNext, I have a form that will be sent with AJAX, but the URL will vary according to the ID, example: site.com/ajax/remove/100 <- ID site.com/ajax/remove/200 <- ID This ID value is in an Hidden… 
- 
		1 votes1 answer42 viewsQ: CRSF protection when deleting multiple AJAX itemsWhen I use a single form (registration, for example), I create a token and a Session to "control" that the request will only be executed from the source page. But when I have several buttons, which… 
- 
		3 votes2 answers580 viewsQ: Take JSON value and set AJAX behaviorHow to take the JSON value with ajax and define the behavior, which div and which message to display, for example: If the JSON returns {"error":"true","message":"Algo deu errado"} would display any… 
- 
		1 votes1 answer330 viewsQ: Is there a PHP library or plugin for field validation?Is there a library, plugin or something that makes the task of validating fields, string and etc easier and more practical? Ex: I have to take the username,e as it is a name will only accept letters… 
- 
		0 votes3 answers1486 viewsQ: Send form with ajax and return errors in a divI am using some libraries of Boostrap, as the one of the balloons of Alert, and would like to show them depending on the result AJAX, how can I send a post with AJAX and return the errors/successes… 
- 
		7 votes1 answer131 viewsQ: Search in two Mysql tablesIs it possible to "select" by merging two tables in Mysql? for example: I have a table called "favorite" that saves the id_da_postagem and the id_do_usuario. the idea would be to go through the… 
- 
		1 votes1 answer1789 viewsQ: Validate characters only with letters and spaces (including accents)How can I validate a string and accept only letters with or without accent and spaces? I read a little about the ctype_alpha, but it didn’t work with accented lyrics, although I set the configs to… 
- 
		1 votes1 answer768 viewsQ: Validate ZIP code and populate fields automatically jquery validateHow can I validate a zip code and fill in a field, for example the one in the city, using jquery validate? For example: the field (input) that the user would fill the city would be "disabled" and… 
- 
		0 votes4 answers703 viewsQ: Validate facebook profile URLHow do I validate a facebook profile URL and get the user id? Examples: http://www.facebook.com/walterwhite http://www.facebook.com/profile.php?id=xxxxx And the other variations: htttps://facebook… 
- 
		1 votes1 answer41 viewsQ: Invalid Mysql characters error?I am using this query to do a database search: SELECT * FROM cidades WHERE cidade LIKE ? LIMIT 1 in the placeholder I used "Narnia" And I got this mistake: General error: 1267 Illegal mix of… 
- 
		2 votes1 answer75 viewsQ: Prevent non-logged users from accessing pagesI have a class called "Account" and its methods are the pages that the logged-in user can access, e.g.: Class account { function info (){ //bla bla } function post () { // bla bla } } and for each… 
- 
		1 votes1 answer848 viewsQ: increase Curl response speed?I am using a google API and I am testing it with the code below, but there is a huge difference in direct loading by browser and PHP, it takes a lot by PHP, there is some way to "accelerate" this?… 
- 
		1 votes1 answer1872 viewsQ: Generate unique name for file after uploadNext, I have an upload form so that the user can post some images, and it is necessary that he is logged in to post, in each post the maximum number of images allowed is 5, I was following this idea… 
- 
		3 votes1 answer1393 viewsQ: Is there a Google API to capture the featured search information?Is there an API or something similar in which I can capture the featured information of a google search? For example, when I search "Bill Gates" appears on the right frame some information about it:… 
- 
		1 votes0 answers54 viewsQ: organize conditions for an SQL queryI have the following SQL statement to do a database search: $query = "SELECT * FROM table WHERE MATCH(title,content,tag) AGAINST(? IN BOOLEAN MODE)"; but there are some options that can be… 
- 
		0 votes0 answers46 viewsQ: Security when entering data into the databaseNext, I have a contact form on one page, and I would like it to only work within the page itself, and not for third parties to be able to submit POST requests for malicious programs or ETC,… 
- 
		2 votes1 answer148 viewsQ: Is it possible to bypass (bypass) a regular expression?I am reading a little about regex for some validations and I wanted to know if there is any way to circumvent some rule, for example: $rule = "/[^A-Za-z0-9]/"; I found this to validate alphanumeric… 
- 
		3 votes0 answers24 viewsQ: Some plugins do not work with different jQuery versionsForgive me if this question seems a little ignorant, but one thing I realized while testing some plugins was that some, old or not, did not work with a specific version of Jquery. by default was… 
- 
		0 votes1 answer167 viewsQ: Change button behavior according to URLHow can I change the behavior of a button according to the URL? I have the following URL, e.g.: site.com/search/hill climbing machine the button would be something to filter according to the price,… 
- 
		3 votes1 answer1095 viewsQ: Best practices for a login system Sessions/CookiesI would like to know some important points when making a login system: Sessions x Cookies Which is the most appropriate in security matters? Which uses the least server resources? (case in a large… 
- 
		1 votes1 answer2107 viewsQ: take input value and redirect page after SubmitHow can I get the value of an input and after "Submit" redirect to another page with this value in the url? Ex: site.com/search/VALOR_BUSCA <form> <input type="text"/> <input…