Software Archive
Read-only legacy content
Announcements
Important Update: Community Platform Migration​. Learn more​>
17060 Discussions

Data Base No Connect

Wilian_G_
Beginner
1,794 Views

I'm not able to connect the XDK in phpMyAdmin.
I'm connecting the XAMPP and my port to use 3306.
It is giving error in funcao.js in all places that declare '' $ ''
Follow the code below

$( document ).ready(function() {
                    var $server;
                    $server = 'http://localhost:3306/xamp/registro/www';
        
                    $('#inclusao').on('click', function(){
                    $nome = $('nome').val();
                    $sobrenome = $('#sobrenome').val();
                        
                    $.ajax({
                        
                               type: "get",
                               url: $server+"/conecta.php",
                               data: "nome="+$nome+"&sobrenome="+$sobrenome+"&acao=inclusao",
                               success: function(data) {
                            intel.xdk.notification.alert('Usuario Cadastrado:','Aviso!','OK');
                                   Lista();
                                   
     
                            } 
                        
                        });  
                    });
    
    function Lista(){
                           $.ajax({

                               type: "get",
                               dataType  : 'html',
                               url: $server+"/conecta.php",
                               data: "acao=listarusuario",
                               success: function(data) {
                                    $('#listarusuario').html(data);
                                }
                           });
                   }
         Lista();
                   
            });

0 Kudos
1 Reply
Wilian_G_
Beginner
1,794 Views

------RESOLVED---------
WE HAVE TO DECLARE THAT IN THE HOME

/*jslint browser:true, devel:true, white:true, vars:true */
/*global $:false */
/* jshint strict: false, -W117 */

 

 

0 Kudos
Reply