Posts by Wagner Viana • 615 points
44 posts
-
1
votes2
answers40
viewsQ: Logout error, no connection class found
I have the following logout code: <?php require_once 'session.php'; require_once 'User.php'; $user_logout = new User(); if($user_logout->is_loggedin()!="") {…
phpasked Wagner Viana 615 -
1
votes1
answer147
viewsQ: Laravel user registration 5.4?
I am trying to register a user in the table and is returning the following error: SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES) (SQL: select count(*) as…
-
0
votes0
answers131
viewsQ: Error to the popular Google Chart
The following error appears Invalid data table format: column #0 must be of type 'string'. Right now I have the return in json this way:…
-
0
votes1
answer1177
viewsQ: How to catch element by Jquery id?
I have the following HTML code generated by PHP: <li id="15" data-status="Em Processo" class="list-group-item tasks-list-group"> <p style="display: none">#15</p> <span…
-
2
votes1
answer5727
viewsQ: How to return today input type date?
I’m trying to fill in an input field with type="date" with the date of the day the form is being completed. I tried the following code in PHP: function getDatetimeNow() { $tz_object = new…
-
4
votes4
answers6187
viewsQ: How to pick up element above Jquery?
I have the following elements: <p class="id-task">5</p> <p class="status-change"> <i id="test-task" class="fa fa-flask fa-lg" aria-hidden="true"></i> </p> I’m…
-
1
votes1
answer156
viewsQ: How to select Option value with Ajax data return?
I have the following HTML code: <select id="priorities-info" class="form-control selectpicker" data-live-search="true" disabled="" tabindex="-98"> <option value="1"…
-
0
votes1
answer364
viewsQ: Return via Ajax data in an input type date with Jquery
I have the following Ajax code: $.ajax({ type:"post", url:"../connect/post/infoTask.php", data:'info-task='+idtask, success:function(responseData){ $(".delivery-info").val(responseData.Delivery); }…
-
3
votes1
answer96
viewsQ: Pure Javascript Drag n Drop
I’m trying to make a pure Drag'n Drop with Javascript: Example Two mistakes if I can’t solve: 1 - When I drag the List 2 it always puts the element down the mouse and not on top. 2 - When I try to…
-
0
votes2
answers236
viewsQ: While Ajax Jquery
I have the following code: $.ajax({ type:"post", url:"../connect/post/infoClienteTask.php", data:'infoClienteTask='+fantasy, success:function(responseData){ console.log(responseData);…
-
3
votes1
answer368
viewsQ: Format date in INSERT and UPDATE Mysql PHP
Well I have a registration Gride with date, only I have to use a Mask of Jquery: $(document).ready(function(){ $('.date').mask('00.00.0000'); }); But when I do an INSERT, for example, the date…
-
1
votes1
answer764
viewsQ: SELECT inside INSERT PHP Mysql
I have the following code: $sql = mysql_query("INSERT INTO TB004_PRODUTO_FORNECEDOR ( TB002_CODIGO, TB003_CODIGO ) SELECT TB003_CODIGO, 1 AS Codigo FROM TB003_PRODUTO WHERE TB003_DESCRICAO =…
-
1
votes1
answer218
viewsQ: Return "Undefined" Ajax PHP
Next I’m trying to return a database value via Ajax. By clicking the button: <button id="btn-database-finder" name="database-link" type="button" class="btn btn-outline btn-primary btn-xs…
-
3
votes1
answer594
viewsQ: Return Json PHP to Ajax
Next I have a variable in php client. printing : [{"CODIGO_CLIENTE":3,"CGC":"78.079.128\/0001-80","RAZAO":"Cliente 2","FANTASIA":"Cliente 2","TELEFONE1":"+99(99)9999-9999"},…
-
0
votes0
answers45
viewsQ: PHP json for Ajax request
I have the following function in Class Read.php : public function selectCliente(){ try{ $stmt = $this->conn->prepare("SELECT CLIENTE.CODIGO_CLIENTE, CLIENTE.CGC, CLIENTE.RAZAO,…
-
4
votes1
answer941
viewsQ: How to transform Array into distinct variables?
I have the following array that returns me the following values: ( [cliente] => Array ( [0] => Array ( [Code] => 1 [Name] => a ) [1] => Array ( [Code] => 2 [Name] => b ) ) )…
-
0
votes1
answer641
viewsQ: Receive Json via post Ajax PHP
Good morning! I have this code that sends an array containing data in json format: Array Json: {"cliente":[{"Code":"1","Name":"A"},{"Code":"2","Name":"B"}]} Ajax: $('#btn-sinc').click(function(){…
-
0
votes0
answers41
viewsQ: Send Post Ajax outside the same project
Explaining better, in Eclipse PHP I have Project 1 and Project 2, and I am emulating PHP in Xampp, I wanted to send a Post via Ajax from Project 1 to Project 2, but I’m not getting it. Error:…
-
2
votes2
answers347
viewsQ: Local Storage - Always replaces last data
I have this code: var ClienteArray = []; $('#btn-save').click(function(){ var cliente = JSON.stringify({ Code : $('#stn-code').attr('value'), Name : $('#stn-name').attr('value') });…
-
0
votes2
answers2300
viewsQ: Jquery, . val() does not take input text
I have a following code: INPUT <div class="row"> <div class="form-group"> <div class="col-sm-3"> <div class="form-group input-group"> <input id="contact-input" type="text"…
-
0
votes1
answer554
viewsQ: Black screen when compiling Android apk for Delphi X5 for Asus Live
I’m simply creating an application with a button, nothing else, just to run an app on Asus Live, but when I send the app to the phone it simply gets all black screen and after a while closes. The…
-
2
votes1
answer9626
viewsQ: Warning: Invalid argument supplied for foreach()
I have the following select: public function SelectLastError(){ try { $stmt = $this->conn->prepare("SELECT Name, Data FROM Errors ORDER BY ErrorsId DESC LIMIT 3"); $stmt->execute(); while…
-
2
votes0
answers174
viewsQ: UPDATE PDO, AJAX, PHP Object-Oriented
I have the following function within my class public function update(){ try{ $stmt = $this->conn->prepare("UPDATE Tabela SET Dado1 = :Dado1, Dado2 = :Dado2, Dado3 = :Dado3 WHERE DadoId =…
-
0
votes3
answers1525
viewsQ: How to create HTML elements with Javascript?
I have the following code Jsfiddle It creates a div that gives to insert information and that when calling the contextmenu with the direct button opens a box to insert an image. My question is: How…
-
0
votes1
answer400
viewsQ: Upload PHP and Mysql image array
I have the following code: <?php if(isset($_FILES['files'])){ $errors = array(); foreach ($_FILES['files']['tmp_name'] as $key => $tmp_name){ $file_name = $key.$_FILES['files']['name'][$key];…
-
1
votes2
answers101
viewsQ: How to select a field with MAX()+1 and use in an INSERT?
I have the following code: $Position = $this->conn->prepare("SELECT MAX(OrderTask)+1 as OrderNew FROM tasks"); $Position->execute(); $newPosition = $Position->fetchAll(PDO::FETCH_NUM);…
-
1
votes1
answer259
viewsQ: Error md5 when renaming upload php file array
I have the following code that uploads multiple files: <?php if(isset($_FILES['files'])){ $errors = array(); foreach ($_FILES['files']['tmp_name'] as $key => $tmp_name){ $file_name =…
-
-1
votes2
answers508
viewsQ: Case Insensitive - Jquery Search System
Good morning! I have this code that searches inside a list <ul> <li>: $(function(){ $('input[type="text"]').keyup(function(){ var searchText = $(this).val(); $('.filter-task >…
-
2
votes3
answers792
viewsA: How do Apache (wamp) stop killing the session by itself?
There are several types of settings you can make in Apache . htacess: <IfModule mod_php5.c> # Definir o tempo máximo de execucao do script para 30 mins (padrão: 60s) php_value…
-
1
votes1
answer962
viewsQ: Condition "if and Else" for sending Ajax, taking the text of the <span> tags?
Kinda hard to explain by the title, but here’s the thing, I have a foreach that prints in a list <ul> <li> tags, and within it I have the following code: <?php if ($row['Status'] ==…
-
0
votes1
answer178
viewsQ: Sending AJAX and PHP array
I am trying to reorder a list of items, which when clicking a button releases the reordering and when clicking again it saves, but if I do more than one reordering it only accepts the first one.…
-
3
votes2
answers2998
viewsQ: Take id onclick and send values via Ajax
I have a list of tasks, it has the status part, which shows for example 'On test' and a button of Approve. I’m trying with that button Approve when clicked take the task id and send an update to it…
-
2
votes0
answers145
viewsQ: Drag & Drop AJAX
I have the following codes INDEX.PHP <section class="content"> <div class="row"> <div class="col-md-6"> <div class="panel panel-default"> <div class="panel-heading">…
-
0
votes2
answers524
viewsQ: Post Ajax for Class PHP
I have the following code that saves reordering a list. INDEX.PHP <?php require_once ("Class.Drag.php"); $auth_task = new Drag(); $list_order = strip_tags($_POST['list_order']);…
-
0
votes0
answers228
viewsQ: Login User PHP
I’m making the following code PHP public function Login($uname,$umail,$upass) { try { $stmt = $this->conn->prepare("SELECT usersid, user, email, password FROM user WHERE user=:uname OR…
-
1
votes1
answer177
viewsQ: foreach with multiple variables
I’m trying a foreach with several variables like? $record = array(); foreach($resultCustomers as $group) { $record[$group['CODIGO_CLIENTE'].$group['RAZAOSOCIAL']][] = $group['NOME']; } $output =…
-
0
votes3
answers476
viewsA: Grouping data from a PHP Array
Got this way, my array is in $recordCustomers. $temp = array(); foreach($recordCustomers as $arg) { $temp[$arg['CODIGO']][] = $arg['NOME']; } $output = array(); foreach($temp as $id => $name) {…
-
0
votes3
answers476
viewsQ: Grouping data from a PHP Array
I want to group the data with the same code of this array, I have tried several ways, but so far nothing. Someone has an idea? array (size=5) 0 => array (size=2) 'CODIGO' => string '231'…
-
0
votes0
answers214
viewsQ: How to create the Hover effect with two canvas superimposed with opposite effects?
Previous Code. *Below is the example of the code: Jsfiddle Antigo New code for anyone! Jsfiddle Novo…
-
1
votes1
answer60
viewsQ: mouse Hover Javascript
I managed to do it with jquery, here’s the code for whoever needs it. <script type="text/javascript" src="dist/jquery/jquery-1.12.3.min.js"></script> <canvas id="diamond" width="100"…
-
1
votes1
answer88
viewsA: Array for PHP Table
$ftp_server = "ftp.site.com.br"; $ftp_user = "USER_FTP"; $ftp_pass = "SENHA_FTP"; $conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server"); if (@ftp_login($conn_id, $ftp_user,…
-
0
votes1
answer88
viewsQ: Array for PHP Table
I have the following code that connects on an ftp and back a list. But I can’t get him to build a table with that list. Someone knows how to do? $ftp_server = "ftp.site.com.br"; $ftp_user =…
-
1
votes1
answer217
viewsQ: Javascript Onrowclick Returns to HTML With All Row
I would like to return all values within the , ie Row One - A - 1 and so on each time I click on a Row, but currently I can only print Row One. <div id="divTable"> <table id="userTable"…
-
0
votes1
answer103
viewsQ: PHP registration form via javascrit
I am trying to put together a registration form via javascript where it opens a form via dialog. <div id="toolbar"> <a href="javascript:void(0)" class="linkbutton" iconCls="icon-add"…