I send a http.post from Angular to PHP backend. With GET it works perfectly fine. With POST the server always receives the variables empty, even tho they are not. (see picture of browser info) <?php header(‘Content-Type: application/json; charset=utf-8’); header(‘Access-Control-Allow-Methods: GET, POST, OPTIONS’); … ?> <?php require ‘database.php’; $email = $_POST["eMail"]; $password = $_POST[‘PW’]; …?> Only ..
Author : Mindmassacre
i’m checking in my PHP backend if there are any rows for requested user, if there are I return true, else false: if ($result->num_rows > 0) { $myVar = TRUE; echo json_encode( $myVar ); } else { $myVar = FALSE; echo json_encode( $myVar ); } and in my angular ts file i try to get ..
I can not display json from my mysql DB in HTML as soon as any öäü is in any of the columns. Otherwise it functions just fine. If I show several variables with ngFor, as soon as one umlaut(äöü) is in any variable, none of them are shown whatsoever. Also, is there a way to ..
im using php backend to read data out of mysql db on the server. I want to get the data in angular and save it in a variable so i can do simple stuff like displaying it. How can i make something similar to a getter/setter here to read the json? (browser shows database request ..
I try to access a PHP file to connect to my mysql DB, both on a real webserver. Im doing it wrong obviously. But how would I access the path. The Angular build (dist) is in a folder in the server. The PHP files are at the exact same path. import { HttpClient } from ..
i´ve got a question about how to best implement a ("simple" because im not a pro) connection to a existing mysql database (on webserver) with Angular. Since I looked through the internet for days now. I only need to check trough a form group in a existing DB if username with e-mail is already in ..
A very basic question. I fail to correctly implement a js file in my angular project or to correctly use the module. I simply put this code in a serchSubjects.js file which I put into assets. var app = angular.module(‘myApp’, []); app.controller(‘myCtrl’, function($scope) { $scope.name = "John Doe"; }); And this code in my mathematics-index.component.html ..
A very basic question. I fail to correctly implement a js file in my angular project or to correctly use the module. I simply put this code in a serchSubjects.js file which I put into assets. var app = angular.module(‘myApp’, []); app.controller(‘myCtrl’, function($scope) { $scope.name = "John Doe"; }); And this code in my mathematics-index.component.html ..
Recent Comments