Posts by Amanda Lima • 3,428 points
87 posts
-
1
votes1
answer1197
viewsQ: Is there any way to save the input value to a Session?
I need to save the value typed by the user in a input unused form. I thought about SESSION, but I don’t know any way to do that. There is a? The input: <input type="text" name="valor"> I want…
-
2
votes2
answers1021
viewsQ: Problem to get input value with javascript
I’m taking the value of input via JS and sending via GET to another page. The problem is that when I type space in the input, I can’t get what I wrote after space. If I type for example: Ana Maria…
-
14
votes2
answers4492
viewsQ: Is there any way to foreach two variables at once?
I tried separating by comma, but it didn’t work: foreach($dados as $d, $telefones as $t){} I know there are other ways to do this foreach that work, but I wanted to remove this curiosity. It is…
phpasked Amanda Lima 3,428 -
6
votes3
answers1293
viewsQ: Problem to remove element added with jQuery
I have on a page one input, a button to add more inputs and each has a corresponding button to remove it. The problem is I can’t remove the inputs added via button. Only the original is removed.…
jqueryasked Amanda Lima 3,428 -
2
votes3
answers658
viewsQ: Problem removing elements with jQuery
I am trying to remove fields from a form that are inside a for. The problem is that only the first for element is removed, the others do not work. I think maybe I did something wrong in the…
jqueryasked Amanda Lima 3,428 -
4
votes1
answer783
viewsQ: Two conditions in SQL query with Laravel 4
I need to make a query to Mysql with two conditions. I tried to do so: $query=DB::table('veteranos')->where('ra', '2300')->where('flag', 0)->pluck('ra'); In this way, the second condition…
-
4
votes1
answer1262
viewsA: Mysql Error Code: 2006
The problem may be in the configuration of Mysql. In my.cnf file on Linux or my.ini on Windows search and leave this line like this: [Mysqld] max_allowed_packet = 16 M Increasing the capacity of…
mysql-workbenchanswered Amanda Lima 3,428 -
0
votes2
answers259
viewsA: Image upload with transparent background
The image will have a transparent background if made in PNG format. You can do a check when the user uploads the image, ensuring that the image is in PNG format. It should be specified to the user…
imageanswered Amanda Lima 3,428 -
5
votes1
answer395
viewsQ: Rollback in specific table Laravel 4
I am manipulating a Mysql database with Laravel 4. I want to know if there is any way to do a rollback in just one of the database tables. For example, my Migration included the tables x, y and z. I…
-
4
votes1
answer1244
viewsQ: Insert array into database with Laravel
I have a form that returns an array with the values: Número: {{Form::text('tel[]')}} Proprietário: {{Form::select('proprietario[]',['Aluno'=>'Aluno','Pai'=>'Pai'])}} Tipo:…
-
6
votes1
answer1113
viewsQ: Set default value for database column in Laravel 4
How can I add a default value to a column of my Mysql table via Laravel 4? In SQL would be: create table tabelaTeste( id int NOT NULL AUTO_INCREMENT, coluna1 varchar(50) DEFAULT valor, PRIMARY…
-
3
votes4
answers8633
viewsQ: SQL query comparing two fields of the same table
I have a table in SQL Server and I’m having trouble making a query. I have a table like this: alunos ra nome serie cod_curso 23 joão 1 EI 23 joão 2 EI 23 joão 3 EI 44 maria 5 EF 44 maria 6 EF 61…
-
2
votes4
answers7832
viewsQ: Redirect problem in Wordpress
After a change in the settings of the Wordpress admin panel, it was no longer possible to access any page other than the home page, the administrative panel itself and the appearance of the site…
-
2
votes2
answers62
viewsQ: Difficulty with creating SQL query
I am creating a view with the following query: select COD_PESSOA as ra, NOM_PESSOA as nome, COD_PESSOA_PAI as pai, COD_PESSOA_MAE as mae, from PESSOA This query returns a result like this: ra nome…
sqlasked Amanda Lima 3,428 -
1
votes2
answers477
viewsQ: Invalid URL server error 500
Whenever having access a URL that does not exist on my site, this error appears The server encountered an Internal error or misconfiguration and was Unable to complete your request. Have any way to…
-
1
votes1
answer385
viewsQ: Broken image - Laravel 4
I have an image on a page, inserted as follows: <img src="img/logo.png"> The image usually appears on pages with an address /page . But when the URL is in format /page/sub-plant the image…
-
4
votes1
answer931
viewsQ: Pass route variable to controller method
I need to pass a variable from a route to a controller method. The route: Route::get('busca/{id}', 'MatriculasController@busca'); How can I pass the variable id for the method?…
-
6
votes3
answers1461
viewsA: Problems with PHP encoding in UTF-8
I’ve had the same problem. I managed to solve it this way: mysql_query("SET NAMES 'utf8'"); mysql_query('SET character_set_connection=utf8'); mysql_query('SET character_set_client=utf8');…
-
3
votes1
answer120
viewsQ: Doubt with Routes and Controllers Laravel 4
I’m a beginner in Laravel and I’m having a problem with routes and controllers. I created a form with the following action: {{ Form::open(array('action' => 'MatriculasController@formulario' }} I…
-
3
votes2
answers1590
viewsQ: How to make a progress bar?
I have a page that is loaded via jQuery load. Inside this page is an SQL query that takes on average 8 seconds. I’d like to put some indication that the query is loading, could be a progress bar,…
-
3
votes2
answers2054
viewsA: Is it wrong to structure a form with tables?
It’s not wrong but it’s outside HTML5 standards. Ideally, you should use Divs and style them using CSS. There are frameworks that facilitate the work of creating layout structuring as the Grid960.…
-
6
votes0
answers2043
viewsQ: Work with two databases in Laravel
I’m creating an application that needs to connect to two different databases. A database I am creating (Mysql) and a database I received ready that I am only allowed to query (SQL Server). The…
-
4
votes2
answers2678
viewsQ: css files in Laravel 4
I’m starting with Laravel and I don’t know where to put the css files, since there is no Assets folder, as there is in Laravel 5. I need to work with version 4, because the PHP version on the server…
laravel-4asked Amanda Lima 3,428 -
5
votes2
answers122
viewsQ: How to store form data in 2 different databases?
I have a form that data needs to be saved in a local bank and another database on a server. Is there any way to do that without duplicating the "Insert" code? In the connection file I configured the…
-
0
votes4
answers1278
viewsQ: Difficulty with MSSQL and PHP on Centos 6 server
I cannot run a PHP system on the server (Centos 6). When I try to connect to a MSSQL database the following error appears: Call to undefined function mssql_connect() My localhost works normally. The…
-
6
votes1
answer5078
viewsQ: Configure page headers with DOMPDF
Is there any way to set up DOMPDF to put a header on all pages of the generated PDF? I am generating a report and I would like all pages of the report to have the header of the first. //define o…
-
2
votes1
answer376
viewsQ: Load page via load with problem
I want to load a page inside a div via load passing a variable that will define the contents of the page to load. My code: index php. <!DOCTYPE html> <html> <head> <script…
-
4
votes1
answer343
viewsQ: How to get the value before MAX in SQL?
How can I get the value before the MAX in SQL? I tried to MAX -1 but it did not work, because the values of the column I want to select the value before the MAX are not in ascending order.…
sqlasked Amanda Lima 3,428 -
2
votes1
answer73
viewsQ: Problem with different encodings between databases
I am creating an application that needs to take some data that is in an SQL Server database with iso-8859-1 encoding, and insert into a Mysql database with utf-8 encoding. A few words with accents…
-
6
votes4
answers12072
viewsA: Include UTF-8 charset in mysqli connection
Use this way with mysql: You can change your constructor to: public function __construct() { $this->con = mysqli_connect(DB_HOST, DB_USERNAME, DB_PASSWORD, DB_NAME); if(mysqli_connect_error()) {…
-
13
votes6
answers17792
viewsA: Accentuation problem while recovering records in SQL Server
I found the solution to this problem in a very simple way. When printing the string, I used the function before utf8_encode($variavel_contendo_string) and the problem was solved! This function…
-
3
votes2
answers999
viewsQ: Difficulty creating sessions to save form data
I have a form that has 6 fields and a button that allows the user to repeat these 6 fields to add more data. I want to save the data in a session, and write to the BD only when the user has…
phpasked Amanda Lima 3,428 -
3
votes1
answer776
viewsQ: Store form data temporarily before writing to the database
How do I store data from a form temporarily before entering it into the database? I have a form with a set of fields. After the user fills the set of fields, he will have the option to add another…
-
5
votes4
answers28026
viewsA: Accent in mysql select displaying question sign " "
I had this same problem and I managed to solve it in the following way: In my database connection file, I put the code below: mysql_query("SET NAMES 'utf8'"); mysql_query('SET…
-
4
votes6
answers17792
viewsQ: Accentuation problem while recovering records in SQL Server
When I recover records from a SQL Serve database with PHP errors appear in accentuation. But in the database, the accents are correct. Is there any way to handle this with PHP? I don’t have…
-
15
votes4
answers47253
viewsQ: How to insert a line break inside the echo shell script?
I was wondering if there’s any way to insert a line break inside the echo of the shell script. For example, in the command: echo "Bom dia fulano" I’d like the exit to be: Bom dia fulano I know you…
-
1
votes2
answers2141
viewsQ: Modify variable when clicking javascript and PHP
<script> function clica(){ var x = document.getElementById("clica").value; alert(x); } </script> <?php for ($i=0;$i<10; $i++){ ?> button onclick='clica()' id='clica'…