Posts by Martins Luan • 158 points
16 posts
-
0
votes1
answer322
viewsQ: Date does not "respect" PHP formatting
I gave a search and found no solution to the problem, I really think it should be something simple that maybe I’m wrong. In the system users can insert some files via intranet, when they insert the…
-
1
votes1
answer490
viewsQ: Data with PHP + SQL doing operations
I have some questions: I need to save two dates in the same database table, and I will need to do a function to compare the dates later. Actually I already have a test of it ready, but I thought I…
-
0
votes1
answer1135
viewsQ: Set maximum upload size for PHP
I have in a certain area of the system a form to uplevel images movies and music, this part usually only appears to administrator, but now it will be released to some types of users, I wanted to…
-
-1
votes3
answers1422
viewsA: Clear string with Regex
You need to use the function called str_replace, I made an example for you <?php function limpar_stringl($string){ // replace para limpar variaveis Opcao 01 - Item 01 - Menu Superior $string =…
-
0
votes1
answer88
viewsA: Create a superglobal php variable
For this you have to have a file that will be called on all pages, or with require or with include, Example I work a lot with global variables, in my case I use constant, and use as follows I have a…
phpanswered Martins Luan 158 -
5
votes1
answer137
viewsQ: Why does FILTER_SANITIZE_EMAIL not remove some special characters?
I know how the FILTER_SANITIZE_EMAIL works, but what I can’t understand is why it doesn’t remove the following characters: ! # $% & '* + - =? ^ _ `{|} ~ @. [] . I know that in the documentation…
-
-2
votes1
answer156
viewsA: Validate PHP URL for sending to Database
I am editing the answer because I have misunderstood the question, in your case you or the user who has access to the form will enter a url is this? then the answer is HTML5 and not PHP Your input…
-
1
votes1
answer42
viewsA: Display value in While only in the first record
Wow, if it’s what I’m thinking it’s pretty simple, put a $i = 0; out of the while, when it goes into the while you put $i++, where you want to show the value you put if($i ==…
phpanswered Martins Luan 158 -
0
votes2
answers225
viewsA: Keep while information in variable
Dude from what I understand your problem is that you can’t use the variable outside the while and it’s obvious if it was created inside the while it’s only going to work there, what you need to do…
-
1
votes1
answer63
viewsA: How can I recover the value of a variable sent per myVar date and use in the checkbox?
Simple, I don’t know if it’s the best mode, but it’s the fastest, creates a $_SESSION[] plays the value in recovers where you want and destroys the session Updating With the amount already recovered…
-
1
votes1
answer29
viewsA: How to let only registered users see the link?
Face the question there is the following, you need to check if the user’s SESSAO is open to display the links, I’ll give you an example if(isset($_SESSION['logado']) == true){ include…
phpanswered Martins Luan 158 -
0
votes1
answer591
viewsA: wysiwyg editor, how to pull the contents of the textarea and insert into the mysql database with php
There are some problems in your code, but to detect your error we need to see how far the text you type arrives, you have already tried to darum var_dump in $_POST before $inserir =…
-
1
votes1
answer125
viewsA: recover url value without refresh
If you just want to read the url you will need ajax, I use daily but never tried what you want to do, however it is possible, in my case I would use ajax not to give refresh and php to get the url,…
-
0
votes2
answers86
viewsA: Error including Session or foreach in PHP code
<?php session_start(); if (array_key_exists('nome', $_GET)){ $_SESSION['lista_tarefas'][] = $_GET['nome']; } $lista_tarefas = []; if (array_key_exists('lista_tarefas', $_SESSION)){ $lista_tarefas…
-
-4
votes1
answer67
viewsQ: Language to develop a live system
I am interested in the systems of live ex, facebook;youtube among others offers these services, in which language this is done, where I begin to study? Basically I want to access the camera of a…
-
1
votes1
answer102
viewsQ: Select in 2 tables
PHP PDO Mysql The question is the following, I have two tables, one calls groups and the other membro_groups, I will give a summary in the tables, I can take the groups and show how many users each…