//This is my html code
//ajtest.html:
<html lang = "en " ng-app>
<head>
<title>Testing database with angular js</title>
<style>
input.ng-invalid(border:1px solid red;}
</style>
</head>
<body>
<form action ="ajdbtest.php" method = 'post'>
username : <input type = "text" name = 'uname' ng-model="user.uname" required>
password : <input type = "password" name = 'pass' ng-model="user.pass" required>
<tr>
<td> Email ID</td>
<td><input type="email" name="prid" value="" ng-model = "user.prid" required /></td>
<td><input type="email" name="paid" value="" ng-model = "user.paid" required /></td>
</tr>
<tr>
<input type = 'submit' value = "submit">
</form>
</body>
</html>
//here is my php code :
<?php
$data = json_decode(file_get_contents("php://input"),TRUE);
$uname = mysql_real_escape_string($data->uname);
$pass= mysql_real_escape_string($data->pass);
echo $uname;
echo $pass;
?>
errors are : Notice: Trying to get property of non-object in C:\xampp\htdocs\ajdbtest.php on line 5
Notice: Trying to get property of non-object in C:\xampp\htdocs\ajdbtest.php on line 6 WHat is Happenening here I am a new bie please help me out ..