Posts by Marcos Vinicius • 7,188 points
309 posts
-
1
votes2
answers75
viewsQ: How to fix these styles to circumvent reported error?
I am modifying inputs checkbox hiding them and calling labels to receive the function of checked. As you can see in FIDDLE and also in the codes shown below, when clicking in ascending order, the…
-
1
votes1
answer113
viewsQ: Why are the data disappearing by refreshing this page?
While I wear that filter for real estate, everything goes well but at the time I refresh the page, the checkbox makes the search disappear. It undoes all the session or at least gives an error in…
-
3
votes2
answers785
viewsQ: How to persist $_SESSION value in <select> as it was done for <input>?
I’m trying to get the value of select in the $_SESSION to persist the search data on a system I’m doing, but I don’t know how to apply this method to the select. Can you help me? I’ll save the…
-
17
votes4
answers1239
viewsQ: Format city names and ignore words like "do", "dos", "das", "da", etc
I’m working with Webservice whose city names are all out of shape and I’d like to create a function to treat the names evenly. An example is this: CHICKEN HARBOR I’d like to keep it that way: Porto…
-
1
votes1
answer652
viewsQ: How to use a variable within another method of the same class?
How could I use the method define_title() the variable $extension that is within the method file_verify? class Title extends Imoveis { public function file_verify($file) { $file = explode("/",…
-
0
votes2
answers111
viewsQ: How to reuse data in a class without having to repeat this data?
How to reuse $dados, $key and $postFields in all methods without having to repeat this data every time within each method? Yes, these variables will always have the same values. class AllImoveis {…
-
0
votes2
answers32
viewsQ: How to expand an array_shift beyond the amount of indexes?
I have a question. I put the code just below before starting a while but inside the loop, calling the array_shift($cores), it applies the classes while loop is <= the number of indices, that is…
-
1
votes1
answer53
viewsA: How do I resolve the prepare error for this script?
Well folks, the only problem in that case there is that I was forgetting to return the result of the setConn and the getConn in turn was returning nothingness since the method setConn also was not…
-
1
votes1
answer53
viewsQ: How do I resolve the prepare error for this script?
I’ve been looking for a solution for 2 hours [this problem][1]. I am starting a course of Virtual store with PHP and the mistake is this: he says I’m trying to give a prepare in an unincorporated…
-
1
votes0
answers26
viewsQ: How to modify this statement to get a url to pt_BR?
I’m working on the theme Academy made by the gringos and I would like to know how to modify this instruction to be able to replace register for cadastrar and thus get a url in pt_BR. 'register'…
-
5
votes2
answers1145
viewsQ: How to assign a different value to the variable in each loop?
$azul = "#4285f4"; // AZUL $verde = "#34a853"; // VERDE $amarelo = "#fbbc05"; // AMARELO $vermelho = "#ea4335"; // VERMELHO $color = rand(1, 4); I’m using $color within a loop but in this simple way…
phpasked Marcos Vinicius 7,188 -
5
votes3
answers742
viewsQ: How to check if a value is present within an array?
$idofdb = "25"; $myArray = array(); foreach ( $fthi as $codigo ) { $myArray[] = $codigo['ImoCodigo']; } $checkValues = array_values($myArray); $checkString = implode(',', $checkValues); //…
-
3
votes3
answers499
viewsQ: How to force the reading of all existing REST results on a page?
foreach ($result as $indices) { // Aqui ele retorna 50 registros por conuslta echo $indices['Empreendimento']; // Provavelmente preciso de um loop da paginação aqui dentro // para falar para o…
-
1
votes1
answer493
viewsQ: How to put the return of Ajax [form] inside a div?
$.ajax({ url: 'executa.php', type: 'POST', data: {emailDestino: emailDestino}, dataType: 'html', success: function(data) { $('#notifyInscrito').appendTo(data); } }); I’m going to the file room…
-
2
votes1
answer116
viewsQ: How to extract a given index within this array with a for?
I’d like to extract all the clues [Foto] of this array but still do not understand correctly how to do this as I am still struggling with learning array multidimensionais. What I was able to do was…
-
-1
votes1
answer186
viewsQ: How to extract data in the form of indexes from this array?
I’m developing a real estate website and I will use the REST. The code below returns me one by one the properties registered in the server software as can be seen here. $dados = array( 'fields'…
-
3
votes3
answers654
viewsQ: How to loop inside an image folder and resize them?
I have this class in PHP that when running resizes the images contained in a folder. If you observe, the resizing is triggered by these instructions, one for each desired size.…
-
3
votes1
answer2127
viewsQ: How to create image thumbnails of an existing image within the folder?
I’m learning to program, including learning VERY MUCH with the help of you who teach me practically everything about functions and my problem now is this: I need to create thumbnails of several…
-
12
votes2
answers52864
viewsQ: How to check if the Term is contained in String in PHP?
I need to check if a certain tag is inside the string. I get this string from the database that comes in the form of tags comma separated without spaces as below: String canais,proteses,implantes…
-
-1
votes2
answers186
viewsA: How to return a specific variable from within a Function?
The whole secret of Solution to this Question is in the return who must send a array informing all variables that can be used. In the example below, you will notice that I passed an associative…
-
3
votes2
answers186
viewsQ: How to return a specific variable from within a Function?
In this code I gave a return $array and I’m using the data inside the foreach, so far so good. I would also like to use the variable $url_controle inside the file I called the function. Question:…
-
8
votes4
answers2145
viewsQ: What technique do I use to keep a form field completed or selected after $_POST[]?
I am developing a real estate system and would like to ask how I can keep the data of a form such as inputs, selects and checkbox selected after giving a $_POST on the form. I don’t know how to…
-
11
votes7
answers811
viewsQ: How to write variables in PHP?
I was watching the videos of Robson V.Leite and I realized that at a given moment he retrieves information from the forms to enter into the database in a different way than I use, the only way I…
-
4
votes1
answer352
viewsQ: How to return all data from an SQL query outside of Function?
I have a function which has the objective of showing all the results of an SQL query to the database and need to assemble a view with the data of this query. To function is the following: function…
-
5
votes1
answer1182
viewsA: How to make a simple shopping system?
Any system has as a basis for managing information several databases such as Mysql, Postgresql, MARIADB ... CRUD is independent of the programming language used. CRUD are four basic operations used…
-
1
votes1
answer40
viewsQ: How do I take information from a website and distribute it in a view?
I made a function that receives data from the database as parameters passed by $_GET[] ... How can I use this information elsewhere in my system? function db_tratcontent(){ $slug =…
-
0
votes0
answers57
viewsQ: How can I make this url more user friendly?
I’m developing this site and studying a little about friendly url’s since I was a Wordpress user and now I’m moving to frameworks and systems. What I want to know is whether the url shown below…
-
3
votes1
answer31
viewsQ: Why isn’t the style sheet being loaded?
I’m trying to use urls amigáveis but I am having some problems in the learning process. The problem now is that the page does not return the page styles. Options +FollowSymLinks RewriteEngine on…
-
1
votes1
answer799
viewsQ: Read data in an SQL with columns of equal names in different tables
I need to recover data from 2 tables. My SQL presented below works perfectly. The problem is that I made a foreach to recover data from the second table by field ID that is conflicting with the…
-
0
votes1
answer132
viewsQ: How to disable the Opera 33 cache so that it does not cache the js scripts?
I’m having a lot of problems because besides learning to program, I have Opera caching all javascripts getting in my way because every new function I put in the file, you have to give F5 in the…
-
3
votes6
answers1359
viewsQ: How to insert an if/Else into an echo?
echo '<option value="0" {if/else} >Em revisão</option>'; echo '<option value="1" {if/else} >Publicado</option>'; I wish I had a condition if/else to ask the database the…
phpasked Marcos Vinicius 7,188 -
0
votes0
answers34
viewsQ: How to solve the logic problem of this php code block?
In this piece of code, I take what the url is sending and save the parameters in variáveis to subsequently pass them into a function. if(isset($_GET['funcao']) && $_GET['funcao'] ==…
-
1
votes1
answer87
viewsQ: How to use friendly urls on a php system?
I’m working on a website, first site I do without Wordpress and would like your help to implement friendly urls. I don’t have much knowledge on friendly and .htaccess but I’m trying to learn. My…
-
1
votes2
answers2558
viewsQ: How to get the value of inputs by declaring this of an element [jQuery]?
jQuery(function($){ $('#upusuario').on('submit', function(){ formulario = $(this).serialize(); Question: How I would pick up input senha and confirmasenha of this form to compare them, of course…
-
-1
votes1
answer545
viewsQ: How to use a Function inside another Function in php?
I need to wear one function inside of another function ... function formata_data( $datacad ){ $datacad = explode(' ', $data); $datacad = $data[0]; $datacad = explode("-", $data); $datacad =…
-
1
votes2
answers70
viewsQ: How to insert the connection inside the functions without repeating the instructions?
Since I have several functions that will use this connection, how to enter the $pdo within the function without copying the require and $pdo within each of the functions that I will draw up?…
-
2
votes1
answer1211
viewsQ: How to run a function from a url?
If I leave the code just below loose inside the file funcoes.php from my system, when the page reloads, it delete the post that I had deleted. $tipo = $_GET['tipo']; $funcao = $_GET['funcao'];…
phpasked Marcos Vinicius 7,188 -
1
votes1
answer129
viewsQ: How to prevent jQuery’s close function from destroying my message container?
When I click the close icon of the error message, the Bootstrap javascript function simply destroys the container #msg receiving error messages preventing the next time an error occurs the container…
-
3
votes1
answer435
viewsQ: How to get all image properties uploaded?
I am here browsing on Google but I did not find in a clear way how to get all properties of the image at the time of uploading in the script. I’m using it to get the image: $imagem =…
-
1
votes2
answers318
viewsQ: How to echo a variable of this function?
Say I want to give echo in $path out of function. How can I do that? It seems simple but I don’t know! function armazena_constantes (){ $path = '/home/axitech/www/dent'; $path_admin =…
phpasked Marcos Vinicius 7,188 -
2
votes0
answers33
viewsQ: How to provide a function in all system files?
I would like to have my function go through all the files within the system. What they have in common is the header.php. I would like the header function to be available in all files that enter…
phpasked Marcos Vinicius 7,188 -
0
votes2
answers204
viewsQ: How do I type this url into . htaccess to get a friendly url?
I need to write an instruction on .htaccess to get this url in a user-friendly format. This is it: http://dent.axitech.com.br/admin/views/home.php ... I need it to turn into:…
htaccessasked Marcos Vinicius 7,188 -
0
votes1
answer403
viewsQ: When to instantiate and when not to instantiate the object?
Watching a video lesson PHP I learned that you can use a class in two ways, without instantiating the object and instantiating the object. // Forma 1 echo SEO_URL::Strip('Caçador mata leão na…
-
3
votes0
answers670
viewsQ: How to simulate https at http://localhost?
How can I simulate https in Xampp so that it returns me the url showing if everything is ok or there are security holes in the scripts used?
-
0
votes0
answers58
viewsQ: How to access a page through dynamically friendly urls?
Well, I must be wanting something very complicated for a beginner but come on ... I’m starting a system where I need to create dynamic and friendly urls to register all the information regarding a…
-
0
votes1
answer336
viewsQ: How to work layouts and javascript in php frameworks
I am doing a course on frameworks and would like to know the following. The tool name itself already speaks: PHP framework Question: You mean the organization of html layouts and scripts based on…
-
2
votes1
answer220
viewsQ: Why does the index() method not recognize the [IC] redirect?
I’m following a course and stopped at a problem that I can’t solve. In this link it is possible to register a user and when finishing the registration he should go to this page but the only thing…
-
1
votes0
answers49
viewsQ: How to change the cookie in each click?
I am doing an exercise to change the cookie at each click through ajax. I would like to set each click a different cookie according to the content that was sent by ajax. I am sending this Ajax to…
-
4
votes1
answer117
viewsQ: Does having the layout ready facilitate development with MVC?
I’m learning to program and study dozens of things at the same time because programming is my job. What I’d like to know is about MVC. I imagined that in relation to the MVC, the V of view should…
-
1
votes1
answer66
viewsQ: How to make it a function to apply it to a PHP variable?
<script> jQuery(function($){ $('#timer').countdown({ until: new Date("2015-11-04 12:00:00"), compact: true }); }); </script> I need to transform the above code in a function and then…