Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // arriba de este código -> código generado por Ionic
- <div ng-controller="controller">
- <ion-footer-bar class="bar-positive tabs">
- <a class="tab-item">
- <h4 style="color:white;" ng-click="registrar()">ALGO</h4>
- </a>
- </ion-footer-bar>
- </div>
- //abajo de este código -> código generado por Ionic
- (function (){
- var app = angular.module('starter', ['ionic'])
- app.controller('controller', function($scope, $http) {
- $scope.registrar = function(){
- $http.post("php/Conexion.php",{
- }).success(function(data){
- console.log("exito");
- });
- }
- });
- app.run(function($ionicPlatform) {
- $ionicPlatform.ready(function() {
- if(window.cordova && window.cordova.plugins.Keyboard) {
- cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
- cordova.plugins.Keyboard.disableScroll(true);
- }
- if(window.StatusBar) {
- StatusBar.styleDefault();
- }
- });
- })
- }())
- <?php
- $server = "localhost";
- $user = "root";
- $pass = "";
- $bd = "datosingreso";
- $dat0=1;
- $dat1="uno";
- $dat2="dos";
- $dat3="tres";
- session_start();
- $conexion = mysqli_connect($server, $user, $pass,$bd)
- or die("error");
- $sql="INSERT INTO `tutorial` (ID,Titulo,Descripcion,Imagen) VALUES('dat0','dat1','dat2','dat3')";
- if(!$result = mysqli_query($conexion, $sql)) die();
- $close = mysqli_close($conexion)
- or die("error");
- echo $sql;
- ?>
- ionic.bundle.js:25005 POST http://localhost:8100/php/Conexion.php 404 (Not Found)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement