Share My Creation App Login with mysql to Php

Sorry but I can not write in English!

Versione 1.03 beta

1.png2.png3.png4.png5.png





Versione 1.03 beta

Mi spiace solo non poter tradurre in inglese non sono capace!
Ho creato con gli esempi trovati nel server un’applicazione di login attraverso pagina web sul proprio sito usando un database MYSQL e due pagine php trovate sul forum.
Potete usare attraverso le mie pagine web per eseguire degli esperimenti,naturalmente sempre utilizzando bene senza crearmi casini nel db LoL, se ciò accadesse elimino il db.CHI LO USA E RESPONSABILE DELLE PROPRIE AZIONI.
Per ora e solo una beta ci sto lavorando per alcuni problemini,aggiornerò man mano risolvo!.
Vorrei sapere anche il livello di sicurezza di questo beta login, se potete provarlo e magari segnalarmi.
Anche Bug segnalate pure!!
Help me!!!! So che sono momenti difficili ma se qualche persona ha la possibilità e lo usasse per creare applicazioni ed è cosi generosa da potermi aiutare per proseguire con le mie applicazioni e può donarmi qualche soldino tramite Donate con paypal Gli dico molte Grazie!!

Translated to English by merlin2049er.
Version 1.03 beta
I only regret not being able to translate into English are not capable of!
I created with the examples found in the application server through the login page on your web site using a MySQL database and two php pages found on the forum .
You can use through my web pages to perform the experiments , of course, always using good without create me trouble in the db LoL , if that happens I delete db.CHI THE USA AND MANAGER OF YOUR ACTIONS .
For now only a beta and I'm working for some troubles , I will update as I solve !.
I would like to know the level of security of this beta login , if you can try it and maybe report me .
Bug also reported as well !!
Help me !!!! I know they are tough times but if any person has the opportunity and used it to create applications and is so generous to help me to continue with my applications and can give me some money through Donate with paypal I say many thanks !!







Pagina per visualizzare i record database!

Pagina web Record



Cosa si può fare:
Registrazione
Con controllo di utente se esistente,e numeri di verifica anti spam.
Login
Controlla se Nome e Pasword corrispondono.
Modifica Dati Registrazione
possibilita di modifica Password e località,e numeri di verifica anti spam.



•Versione MySQL: 5.5.30-log
• Set di caratteri MySQL: UTF-8 Unicode (utf8)






Librerie B4A :
B4X:
ByteConverter
Core
Encryption
Phone
HttpUtils2
IME
Network

Versione 1.03_beta
Tolto libreria HTTP
Aggiunto Libreria HttpUtils2
Corretto File.DirDefaultExternal con File.DirInternal


Versione 1.2
Modifiche:
Aggiunto Log Out
Correzione vari bugs
Controllo Network State
Aggiunto Ricorda Password
Aggiunto panello hello World dopo aver eseguito il login.

Versione 1.1
Modifiche:
Lettura del db da pagina php
Sicurezze per non creare tabelle e cancellarle
Controllo utente ,login da pagina php




1 Pagina web: B4A2.php
B4X:
<?php

$userdb="xxxxxxxxxxxxxxxx";    // user db
$passworddb="xxxxxxxxxxxxxxxx";// Password db
$databasedb="xxxxxxxxxxxxxxxx";// Name db

$rows = array();

$con = mysql_connect("localhost",$userdb,$passworddb) or die(mysql_error());
mysql_select_db($databasedb) or die(mysql_error());
$query = file_get_contents("php://input");
//$sth = mysql_query($query);


   $action = array();
   $action = split(" ", strtolower($query));

$key = "bXZhbm9tb250aUBsaWJlcm8uaXb=";
$arr1 = array();
$arr1 = split($key, ($query));

$key1 = (strtolower($action[0]));
$key2 = $key;
$key2 = (strtolower($key2));
$action[0] = str_replace($key2, "", $action[0]);
// tolgo la key all query
$query2 = str_replace($key, "", $query);


$kiavedicontrollo = str_replace($query2, "", $query);

    // verifico che la key non sia nulla
    if ( $kiavedicontrollo == null )
    {
        print json_encode("key invalid!");
      return;
    }
   else
   {
   // verifico che la sia uguale alla key spedita
    if ( $kiavedicontrollo == $key )
    {
  
// --------------select-------------- 
    if ( $action[0] == "&login&select" )
    {
      $query2 = str_replace("&login&", "", $query2);
      $sth = mysql_query($query2); 
   }
   if ( $action[0] == "&loginleggodati&select" )
    {
      $query2 = str_replace("&loginleggodati&", "", $query2);
      $sth = mysql_query($query2); 
   }
   if ( $action[0] == "&registrazioneutente&select" )
    {
      $query2 = str_replace("&registrazioneutente&", "", $query2);
      $sth = mysql_query($query2); 
   }
// --------------update-------------- 
if ( $action[0] == "&modificoutente&update" )
    {
      $query2 = str_replace("&modificoutente&", "", $query2);
      $sth = mysql_query($query2);   
   }
// --------------insert--------------
if ( $action[0] == "&inseriscoutente&insert" )
    {
       $query2 = str_replace("&inseriscoutente&", "", $query2);
       $sth = mysql_query($query2); 
   }
  
//---------------------------------------//  
//     Blocco per Sicurezza database     //
//---------------------------------------//
if ( $action[0] == "delete" )
    {
      print json_encode("Non e possibile!");
   }

if ( $action[0] == "create" )
    {
      print json_encode("Non e possibile!");
   }

    }
   }

//----------------Db-Error----------------//  
if (mysql_errno()) {
    header("HTTP/1.1 500 Internal Server Error");
   
   echo ("HTTP/1.1 500 Internal Server Error");
   echo $query.'\n';
    echo mysql_error();
}
else
{
// --------------select-------------- 



if ( $action[0] == "&login&select" )
{
$row = mysql_fetch_assoc($sth);
$num = mysql_num_rows ($sth);

//print json_encode($row['ID']);
//print json_encode($row);
if($num == '0'){ 
// password sbagliata
print json_encode(0);
}else{
// login riuscito
print json_encode($row['ID']);
}
}

if ( $action[0] == "&loginleggodati&select" )
{
$row = mysql_fetch_assoc($sth);
$num = mysql_num_rows ($sth);

print json_encode($row);

}


//controllo se l'utente è già registrato
if ( $action[0] == "&registrazioneutente&select" )
    {
$row = mysql_fetch_assoc($sth);
$num = mysql_num_rows ($sth);

if($num == '0'){
//Nome non esiste!
print json_encode(0);
}else{
//Nome esiste!
print json_encode(1);
}
}
// --------------  --------------     
}
?>



Tabella Database:
B4X:
--
-- Struttura della tabella `B4A`
--

DROP TABLE IF EXISTS `B4A`;
CREATE TABLE IF NOT EXISTS `B4A` (
  `Name` varchar(20) NOT NULL,
  `ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `id_phone` varchar(100) NOT NULL,
  `email` varchar(100) NOT NULL,
  `pw` varchar(100) NOT NULL,
  `amministrator` varchar(100) NOT NULL,
  `luogo` varchar(100) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
 

Attachments

  • B4A_Login1.2.zip
    53.2 KB · Views: 1,885
  • B4A_Login 1.03_beta.zip
    48 KB · Views: 1,366
Last edited:

SuzanaKamis

Member
Licensed User
Longtime User
hi there, your login looks great! but I cant test it anymore. have you shut down your server?
 

merlin2049er

Well-Known Member
Licensed User
Longtime User
Translated the Italian to English 4 You.

Version 1.03 beta

I only regret not being able to translate into English are not capable of!
I created with the examples found in the application server through the login page on your web site using a MySQL database and two php pages found on the forum .
You can use through my web pages to perform the experiments , of course, always using good without create me trouble in the db LoL , if that happens I delete db.CHI THE USA AND MANAGER OF YOUR ACTIONS .
For now only a beta and I'm working for some troubles , I will update as I solve !.
I would like to know the level of security of this beta login , if you can try it and maybe report me .
Bug also reported as well !!
Help me !!!! I know they are tough times but if any person has the opportunity and used it to create applications and is so generous to help me to continue with my applications and can give me some money through Donate with paypal I say many thanks !!
 

rahmi elviana

New Member
hello Mr. Spinter. your login apps looks great! but I cant test it. They said that ""key invalid!"
s
. what should I do. Would you like to help me?
Im trying to translate this to italian using google translate. heheheh
http://kosti.besaba.com/KOSTI/formpelanggan.php

ciao Mr. Spinter . le applicazioni d'accesso sembra grande ! ma non posso provarlo . Hanno detto che "non valido chiave! " . Cosa dovrei fare. Vuoi aiutarmi ?
Nel tentativo di tradurre questo per italiani utilizzando Google Translate . heheheh :D
 
Last edited:

Spinter

Active Member
Licensed User
Longtime User
hello sorry for the delay
But the php page is equal to or modified?
The log of what B4A says the answer?
the key to Ba4 and equal to that of the page php?
php page with my work?
 

mbayik

Member
Licensed User
Hello, i couldnt start your app login example..its says missing library Encryption. I think Encryption library was changed to B4XEncryption. I loaded the new library, it didnt work again.
 

Spinter

Active Member
Licensed User
Longtime User
I tried it now with these libraries and it works!

byteconverter 1.10
core 4.92
encryption 1.10
httputils2 2.'1
ime 1.10
network 1.51
phone 2.27
 
Top