Advertisement
Guest User

Untitled

a guest
Nov 13th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. // arriba de este código -> código generado por Ionic
  2. <div ng-controller="controller">
  3. <ion-footer-bar class="bar-positive tabs">
  4. <a class="tab-item">
  5. <h4 style="color:white;" ng-click="registrar()">ALGO</h4>
  6. </a>
  7. </ion-footer-bar>
  8. </div>
  9. //abajo de este código -> código generado por Ionic
  10.  
  11. (function (){
  12.  
  13. var app = angular.module('starter', ['ionic'])
  14.  
  15. app.controller('controller', function($scope, $http) {
  16.  
  17. $scope.registrar = function(){
  18. $http.post("php/Conexion.php",{
  19.  
  20. }).success(function(data){
  21. console.log("exito");
  22. });
  23. }
  24. });
  25.  
  26. app.run(function($ionicPlatform) {
  27. $ionicPlatform.ready(function() {
  28. if(window.cordova && window.cordova.plugins.Keyboard) {
  29. cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
  30. cordova.plugins.Keyboard.disableScroll(true);
  31. }
  32. if(window.StatusBar) {
  33. StatusBar.styleDefault();
  34. }
  35. });
  36. })
  37. }())
  38.  
  39. <?php
  40.  
  41. $server = "localhost";
  42. $user = "root";
  43. $pass = "";
  44. $bd = "datosingreso";
  45.  
  46. $dat0=1;
  47. $dat1="uno";
  48. $dat2="dos";
  49. $dat3="tres";
  50.  
  51. session_start();
  52.  
  53. $conexion = mysqli_connect($server, $user, $pass,$bd)
  54. or die("error");
  55.  
  56. $sql="INSERT INTO `tutorial` (ID,Titulo,Descripcion,Imagen) VALUES('dat0','dat1','dat2','dat3')";
  57.  
  58. if(!$result = mysqli_query($conexion, $sql)) die();
  59.  
  60. $close = mysqli_close($conexion)
  61. or die("error");
  62.  
  63. echo $sql;
  64. ?>
  65.  
  66. ionic.bundle.js:25005 POST http://localhost:8100/php/Conexion.php 404 (Not Found)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement