Posts by Reignomo • 391 points
52 posts
-
-2
votes3
answers53
viewsQ: cleaning variables with preg_match()
How to use the function preg_match() to remove special characters and allow ., @ and accents? If it is not possible to do with this function, what other can I use to have the same result? Example:…
-
-2
votes2
answers57
viewsQ: Data validation in PHP
I am developing a project which I am using a structure somewhat similar to that of Laravel, this structure allows me to make a CRUD in the whole system using only one class and setting the tables I…
-
1
votes0
answers47
viewsQ: Creating links within PHP views
I’m studying the MVC architecture watching videos and looking for examples on the Internet, I was able to implement the three layers and map the routes of my system, but I was wondering how to…
-
1
votes2
answers78
viewsQ: Autoload does not find PSR-0 class
I made an application using Poser with autload, configured the file Composer.js and set the namespace correctly, but when executing the code one of the classes is not found generating the error…
-
0
votes1
answer1427
viewsQ: PHP MVC folder structure
I am creating a MVC project in PHP and I was wondering how to create the structure of the folders correctly. I made a folder template based on the projects I found on Github but I don’t know if it’s…
-
2
votes1
answer753
viewsQ: Responsive card
I’m trying to create responsive cards, I lined up the card elements using % but when I change the page ratio the elements are misaligned. standard page size reduced-screen html <section…
-
0
votes1
answer35
viewsQ: class definitions do not apply in css
I am doing a project where I am creating several different button styles, created buttons with class names like "button-default", "button-default-Empty". The problem is that I can’t get the first…
-
0
votes2
answers320
viewsQ: How you use the keyup in a specific input
I have made a javascript to verify passwords (forte/normal/fra ca) the problem is that using the keyup in javascript every time a input receives value the password level is changed, need to make the…
-
1
votes1
answer314
viewsQ: Docker Container does not start
I’m a beginner in Docker and I’m trying to create a development environment with ngix mysql and php using Laradock, I have in my machine Docker installed, I tried to follow the steps of…
-
0
votes0
answers27
viewsQ: How to use the click() function with a Toast
I made a system that when the user enters the index is displayed a materialize Toast, I need that when the user click on it it is redirected to another page, I tried to do as follows but I was not…
-
0
votes1
answer168
viewsQ: how to use php inside an echo with html
within a php fileThere is html content by an echo, my doubt is how do I use a for php within that echo. example of how I’m trying to do; echo '<div name="estrelas-cliente"> 'for($i =1; $i…
-
0
votes1
answer74
viewsA: How to return data from a class within an option
it was very confusing its implementation, I think it would be easier for you to create the option in another file and in html you call this new file with the options filled. class Select { private…
-
0
votes1
answer36
viewsA: Help with project code organization
I am also a beginner in language and what helped me a lot in the organization was the use of the MVC standard, is not the only way to do nor the best, but in terms of organization helps a lot. In it…
-
0
votes1
answer63
viewsA: how to display user data on a bootstrap card after login is validated
Difficult to give a solution without seeing part of the code, but I believe you can do so: <?php if(!isset($_SESSION)) { session_start(); } $_SESSION['login'] = $_POST['login'];…
-
0
votes1
answer215
viewsQ: How to use materialize features in php with javascript
is it possible to use materialize in a php file next to javascript ? on the return of a php function I want to issue a Materialize.Oast(); however I’m not succeeding, I already referenced the file…
-
0
votes2
answers51
viewsA: Query does not work inside php
I managed to solve the problem, even showing the contents of the variable with the correct values the query lost the formatting when arriving in the bank on account of utf8, I used…
-
2
votes2
answers51
viewsQ: Query does not work inside php
I made a query with a Join to get information from the database, I tested it in mysql and it worked perfectly, the problem is that it does not work in php, not from the error in the execution but…
-
0
votes1
answer20
viewsQ: failure when trying to assign property of an object with an array index
I am trying to assign the input of an array to an object but am getting the following error; Error: Cannot use Object of type stdClass as array // filtro estado $anuncios = array(); $anunciosFiltro…
-
0
votes1
answer320
viewsQ: How to check if an id exists on the page
made a Javascript that generates several cards each of them with an id, to avoid creating repeat cards I put an if before the generation of cards to check if it already exists, but it did not work:…
-
0
votes1
answer47
viewsA: How to fill table with information from a database?
I don’t know if that’s what you need but I think you can do it that way $("ul").append('<li>'índice.array'</li>');
-
1
votes1
answer69
viewsQ: $. post performs twice
I made a code in Java in which I make requests in php and with the return of a json I populate my html, the problem is that at a certain moment I need to execute the Java code but I am not able to…
-
0
votes1
answer119
viewsA: $. post does not work
I managed to solve the problem was that before sending the data to javascript I was not converting the characters to utf8, I did it in php and the code worked
-
0
votes1
answer119
viewsQ: $. post does not work
I created a Javascript code to receive a JSON, but when the data arrives in the $.post the code stops being processed. I found that in php the JSON file is populated correctly before it is sent to…
-
0
votes1
answer212
viewsQ: How to put an if inside the Javascript append
I made a javascript to assemble a card and fill with information from a json, I need to check if there is an image in the indexes of the json array so that if I don’t have it I can set a default…
-
0
votes1
answer209
viewsQ: How to create Divs within Java and use Json
I am trying to create and fill several html cards according to the return Json I have of a PHP file, I have Javascript that takes the Json array, my doubt is how to create several cards within this…
-
0
votes3
answers147
viewsQ: How to exchange an image for Javascript
I need to change an image through Java but I’m not getting it, I tried it this way and it didn’t work; html <img id="imagemPerfil" src="img/user1.png" alt="profile image" class="circle z-depth-2…
-
-1
votes1
answer53
viewsQ: how to make an if with php parameters inside javascript
I need to do a check before changing html elements, I tried this way but it did not work does not enter if in any circumstances. <script> if("<?php…
-
0
votes0
answers89
viewsQ: I cannot run 2 javascript scripts on the same page
made a javascript script to add and cut an image of an input, the same worked perfectly, the problem is when I try to do the same for another file that is loaded on the same page, the first script…
-
2
votes0
answers32
viewsQ: php does not find image input sent by Ajax
made a javascript to send a picture of a form to php, the script does not return any error but when it arrives in php php can not find $_FILES[]. error: Exception has occurred. Notice: Undefined…
-
0
votes1
answer58
viewsQ: Notice: Undefined index: $_FILES
I am trying to send the data of a form to use in php, I made a script in ajax to send the data, I can access the POST data normally, the problem is that I cannot access the image that is in the form…
-
1
votes2
answers109
viewsA: I want to put an Alert after sending the form to the database, with a response like "Your message has been sent."
You can do this with AJAX as follows; if( $result = $statement->execute($valores)) { echo 1; // dados enviados com sucesso } else { // na verdade o else não é necessário mas se preferir pode…
-
1
votes3
answers1431
viewsA: Page showing interrogation and bench showing accent?
Before entering the data into the database you need to use the UTF8 standard, try as follows; $VARIABLE = Utf8_decode("TEXT"); done this you can already enter the data in the database, if it has not…
-
0
votes0
answers24
viewsQ: Failed to call php in Submit a button
I’m trying to run a php script on Submit from a button, but php is called I get an error on inlcude - "failed to open stream: No such file or directory in "I called php by a include off the button…
-
2
votes1
answer119
viewsQ: On("Click") Javascript does not work
I made a script to get the value of an element that is generated in php, whenever this element is clicked but it is not working <script> $('.collection-item').on('click',function(){ var idA =…
-
0
votes0
answers86
viewsQ: include does not work
I made a modular system in which each part of the pages is in a folder, the problem is that I have a page with a form that is inside a modal, that form receives information from the bank, when I…
-
0
votes0
answers48
views -
0
votes0
answers104
views -
2
votes1
answer630
viewsQ: How to check if there is a specific data in a multidimensional array C#
Work in a school that makes the students frequency control by digital, each time a student "hits" the finger is added to a code to a txt, if the student hit 1 time is recorded input if he hit 2…
-
0
votes1
answer380
viewsQ: How to keep cards on the same line
I created a foreach of objects to display the data of these objects in cards, worked the way I wanted, but appears only 1 card per line, how do I generate 2 cards per line ? HTML <div…
-
0
votes0
answers32
viewsQ: Error while trying to create an object array
I am trying to create an array of objects but am getting the following error message: Warning: mysql_fetch_object(): supplied argument is not a Valid Mysql result Resource in Class class controler {…
-
0
votes1
answer768
viewsQ: How to create Divs inside php
I need to create Ivs that will be populated by objects of a class, I have in mind that will need to use a foreach creating a div for each object, but I do not know how to call and position these Ivs…
-
-2
votes1
answer47
viewsQ: Warning illegal string offset
I created a class with arrays to be populated with objects, selected the database, then made a foreach to create a new object with each row of the select return and save these objects in the array.…
-
1
votes0
answers451
viewsQ: Radio Button does not work
I created a form and put a radio button disabled and let it be enabled at the click of a button, when the button is pressed it is enabled but I can not change the option, the radio is locked in an…
-
1
votes2
answers41
viewsQ: input declared not accessible in javascrit and php
I created a form and I’m trying to get the data of a radio button, and an input, but I’m not able to access them via POST in php or the javascript in which I’m using a function to disable the fields…
-
1
votes2
answers37
viewsQ: Enabling and disabling input
I created a script to enable and disable fields on my page but they are not running. $(document).ready(function() { $("#EditarDados").click(function() { // habilita o campo…
-
1
votes1
answer120
viewsQ: How to call php on a radio button
I’m trying to call PHP to mark a radio button but I’m not getting it. PHP: if($result['sx_sexo']=="Masculino") { $Result_sexoM ="checked"; } else { $Result_sexoF ="checked"; } Radio button <p>…
-
1
votes2
answers283
views -
0
votes1
answer109
viewsQ: Error trying to use mysqli_fetch()
I’m trying to use mysqli_fetch() to turn my mysql result into an array but php returns me the following message: Fatal error: Call to Undefined Function mysqli_fetch() this is the function I’m using…
-
2
votes1
answer183
viewsA: Save more than one data in this form with PHP and Mysqli
Friend as you are using only php both separately and it within html by Session your code gets "poor", so you can not validate the data correctly. Recommend that you use ajax to call php, you will…
-
1
votes0
answers57
viewsQ: Script php and ajax does not run on my machine
I am making a registration system and for this I am using php and ajax, I made the two pages correctly I believe, when I run the script the validations I put in php perform perfectly and returns…