Create Simple API using Angular JS and MySQL

API: Angular JS+Mysql

1. Create an api file.(student_name.php)
2. Create a file which would retrieve data from the database.(information_source_sql.php)

/* Keep following angularjs code in student_name.php */
<!DOCTYPE html>
<html >
<style>
table, th , td  {
border: 1px solid grey;
border-collapse: collapse;
padding: 5px;
}
table tr:nth-child(odd) {
background-color: #f1f1f1;
}
table tr:nth-child(even) {
background-color: #ffffff;
}
</style>
<script src=”http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js”></script>
<script>var app = angular.module(‘myApp’, []);
app.controller(‘customersCtrl’, function($scope, $http) {
$http.get(“http://yourdomain.com/yourfolder/information_source_sql.php”)
.then(function (response) {$scope.names = response.data.records;});
});
</script>
<body><div ng-app=”myApp” ng-controller=”customersCtrl”><table>
<tr ng-repeat=”x in names”>
<td>{{ x.Name }}</td>
<td>{{ x.Status }}</td>
</tr>
</table></div></body>
</html>
=================================================================
/* Keep following code in your information_source_sql.php file */
<?php
header(“Access-Control-Allow-Origin: *”);
header(“Content-Type: application/json; charset=UTF-8”);

$servername = “localhost”; // your hostname
$username = “root”; //your username
$password = “”; //your password
$dbname = “db1”; // your database name

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);

// Check connection
if ($conn->connect_error) {
die(“Connection failed: ” . $conn->connect_error);
}

$result = $conn->query(“SELECT * FROM  `student` where status=’Active'”);

$outp = “”;
while($rs = $result->fetch_array(MYSQLI_ASSOC)) {
if ($outp != “”) {$outp .= “,”;}
$outp .= ‘{“Name”:”‘  . $rs[“information_source_name”] . ‘”,’;
$outp .= ‘”Status”:”‘. $rs[“status”]     . ‘”}’;
}
$outp ='{“records”:[‘.$outp.’]}’;
$conn->close();

echo($outp);
?>

865 thoughts on “Create Simple API using Angular JS and MySQL

  1. Pingback: Google
  2. Pingback: mt-gram.com
  3. Pingback: cursos online
  4. Pingback: xxx
  5. Pingback: fbv cursos grátis
  6. Pingback: Google
  7. Pingback: referat 13712
  8. Pingback: Bandar judi online
  9. Pingback: nfl merchandise
  10. Pingback: 토토정류장
  11. Pingback: Anal vibrators
  12. Pingback: pleasure balls
  13. Pingback: Sexy shayari
  14. Pingback: FIFA Coins
  15. Pingback: wand vibrator
  16. Pingback: Chicago SEO
  17. Pingback: Detroit SEO
  18. Pingback: shmmovers.com
  19. Pingback: curso online
  20. Pingback: hitachi magic wand
  21. Pingback: cock ring vibrator
  22. Pingback: Payday Loans
  23. Pingback: thruster vibrator
  24. Pingback: chwilówki
  25. Pingback: smartphone repair
  26. Pingback: vibrato lesson
  27. Pingback: vibrator reviews
  28. Pingback: adam and eve dildo
  29. Pingback: gay anal vibrator
  30. Pingback: Porn City XXX
  31. Pingback: vibrating panty
  32. Pingback: milking toy
  33. Pingback: realistic dildo
  34. Pingback: xxx porn
  35. Pingback: anal sex toys
  36. Pingback: penis enlargement
  37. Pingback: Mom
  38. Pingback: best anal toys
  39. Pingback: kegel balls
  40. Pingback: strap on dildo
  41. Pingback: 188bet
  42. Pingback: fun88
  43. Pingback: sekscamera
  44. Pingback: pc games download
  45. Pingback: full apps download
  46. Pingback: rencontres sexe
  47. Pingback: butt plug set
  48. Pingback: enema bag
  49. Pingback: Opblaasband
  50. Pingback: BlogBerries
  51. Pingback: free app for pc
  52. Pingback: free app for pc
  53. Pingback: play online games
  54. Pingback: hamptonbaylight
  55. Pingback: cursos gratuitos
  56. Pingback: webcam babes
  57. Pingback: shemale dating
  58. Pingback: p spot massager
  59. Pingback: warm dildo
  60. Pingback: p spot massager
  61. Pingback: realistic dildo
  62. Pingback: powerful vibe
  63. Pingback: sex toys
  64. Pingback: suction cup dildo
  65. Pingback: penis pumping
  66. Pingback: anal play
  67. Pingback: sex toy kit
  68. Pingback: anal cleaning
  69. Pingback: anal training kit
  70. Pingback: Porn
  71. Pingback: easy online loans
  72. Pingback: big jelly dildo
  73. Pingback: warming rabbit
  74. Pingback: hydrastep
  75. Pingback: foreplay games
  76. Pingback: viagra
  77. Pingback: gay sex toys
  78. Pingback: blockchain advisor
  79. Pingback: satta matka
  80. Pingback: double ended dildo
  81. Pingback: thick dildo
  82. Pingback: silicone bullet
  83. Pingback: male masturbator
  84. Pingback: treatment vagina
  85. Pingback: bdsm sex toys
  86. Pingback: porn city
  87. Pingback: pornland
  88. Pingback: butterfly sex toy
  89. Pingback: cyberskin stroker
  90. Pingback: best massage ever
  91. Pingback: rubbish bin hire
  92. Pingback: suction cup dongs
  93. Pingback: male toys
  94. Pingback: bullet sex toy
  95. Pingback: leader bondage
  96. Pingback: newest vibrators
  97. Pingback: vibrating egg
  98. Pingback: bondage toys
  99. Pingback: porn land
  100. Pingback: best real orgasms
  101. Pingback: lingerie stocking
  102. Pingback: minoxidil 15%
  103. Pingback: trixie hundeseng
  104. Pingback: Julia Ann Porn
  105. Pingback: Fashion Station
  106. Pingback: Pentair Light
  107. Pingback: sexboer
  108. Pingback: gratis films
  109. Pingback: geile sex filmpjes
  110. Pingback: pornofilmpjes
  111. Pingback: iptv dreamlink
  112. Pingback: liteblue
  113. Pingback: finger vibrator
  114. Pingback: virtual visa card
  115. Pingback: high tech vibrator
  116. Pingback: опешить
  117. Pingback: acpi ite8708
  118. Pingback: cheap flights
  119. Pingback: hundeseng xxl
  120. Pingback: penis vacuum pump
  121. Pingback: nipple bondage
  122. Pingback: walmartone
  123. Pingback: walmartone
  124. Pingback: Bluechew reviews
  125. Pingback: type 1 diabetes
  126. Pingback: outlook sign in
  127. Pingback: sex toys haul
  128. Pingback: gay lubricant
  129. Pingback: podcast
  130. Pingback: qqonline
  131. Pingback: blowjob
  132. Pingback: mens c ring
  133. Pingback: judi online
  134. Pingback: faceit hacks
  135. Pingback: Hotmail login
  136. Pingback: hasta karyolası
  137. Pingback: سکس نیمه
  138. Pingback: online marketing
  139. Pingback: gay mesh underwear
  140. Pingback: pleasure ring
  141. Pingback: YtMp3
  142. Pingback: prostate vibrator
  143. Pingback: hotmail login
  144. Pingback: mvsd 397
  145. Pingback: SSNI-546
  146. Pingback: glass toys
  147. Pingback: butt plugs
  148. Pingback: anal plugs
  149. Pingback: buy follower
  150. Pingback: seo merimbula
  151. Pingback: reddit ask me
  152. Pingback: how to do anal
  153. Pingback: 192.168.1.1 setup
  154. Pingback: fset 842
  155. Pingback: wand massager
  156. Pingback: CAWD-005
  157. Pingback: how to do anal
  158. Pingback: cock ring porn
  159. Pingback: how to guitar solo
  160. Pingback: app for pc
  161. Pingback: play free pc games
  162. Pingback: apps for pc
  163. Pingback: free app download
  164. Pingback: کوس
  165. Pingback: play free pc games
  166. Pingback: exotic carts pen
  167. Pingback: Boston Car Service
  168. Pingback: Eweka
  169. Pingback: oral sex for men
  170. Pingback: walmartone login
  171. Pingback: kingpen cartridges
  172. Pingback: العاب
  173. Pingback: dank carts
  174. Pingback: Dank Vapes
  175. Pingback: sallyskitchen
  176. Pingback: Marijuana for sale
  177. Pingback: Tramadol for Sale
  178. Pingback: social media
  179. Pingback: Roulette System
  180. Pingback: Tramadol Sale
  181. Pingback: Cool t shirts
  182. Pingback: EBOD-710
  183. Pingback: Sexy girl clothing
  184. Pingback: 618media.com
  185. Pingback: sports blog
  186. Pingback: prostate masage
  187. Pingback: Fintech
  188. Pingback: Roguekiller Crack
  189. Pingback: Target Schedule
  190. Pingback: Google
  191. Pingback: bondage toys
  192. Pingback: gay bondage toys
  193. Pingback: IPX 363
  194. Pingback: Agen Judi Slot
  195. Pingback: onewalmart.com
  196. Pingback: best anal vibrator
  197. Pingback: SEO Vancouver
  198. Pingback: find places to eat
  199. Pingback: PPPD 792
  200. Pingback: daftar joker123
  201. Pingback: HUNTA-651
  202. Pingback: sex toy haul
  203. Pingback: anal trainer kit
  204. Pingback: silicone rabbit
  205. Pingback: strap on dildo set
  206. Pingback: campaigns
  207. Pingback: milfgilf
  208. Pingback: crazy bulk estafa
  209. Pingback: DKN-014
  210. Pingback: CAWD 010
  211. Pingback: The Goat debate
  212. Pingback: sewa led
  213. Pingback: سكس
  214. Pingback: nipple toys
  215. Pingback: video game key
  216. Pingback: hotmail.com login
  217. Pingback: penis ring
  218. Pingback: thrusting toy
  219. Pingback: Buy vape online
  220. Pingback: Thc vape pen
  221. Pingback: cowgirl vibrator
  222. Pingback: Tagius
  223. Pingback: website design
  224. Pingback: MIDE 685
  225. Pingback: free porn xxx
  226. Pingback: Johnna Nunnally
  227. Pingback: erfahrungen mspy
  228. Pingback: DOCP 175
  229. Pingback: ATID 372
  230. Pingback: liteblue usps gov
  231. Pingback: double ended dildo
  232. Pingback: bullet vibe
  233. Pingback: best penis ring
  234. Pingback: bullet massager
  235. Pingback: Buy viagra online
  236. Pingback: wire transfer
  237. Pingback: talk talk
  238. Pingback: watch repair
  239. Pingback: Smm panel paypal
  240. Pingback: anal vibrators
  241. Pingback: vibrators
  242. Pingback: Shipping a Dog
  243. Pingback: cannabis for sale
  244. Pingback: buy weed
  245. Pingback: Teach Abroad
  246. Pingback: dildo review
  247. Pingback: adam and eve dildo
  248. Pingback: buy viagra
  249. Pingback: Xenon 1950g
  250. Pingback: cheap weeds canada
  251. Pingback: realistic dildo
  252. Pingback: butterfly vibrator
  253. Pingback: buy viagra
  254. Pingback: cheap mattress
  255. Pingback: cbd oil for sale
  256. Pingback: cbd for sale
  257. Pingback: cialis
  258. Pingback: viagra
  259. Pingback: stopoverdoseil.org
  260. Pingback: butterfly vibrator
  261. Pingback: vibrator challenge
  262. Pingback: Fildena 100mg
  263. Pingback: smm panels
  264. Pingback: vibrators
  265. Pingback: bdsm play
  266. Pingback: bondage swing
  267. Pingback: bondage restraints
  268. Pingback: petite vibrator
  269. Pingback: kegel balls
  270. Pingback: cyberskin sex toys
  271. Pingback: penis extenders
  272. Pingback: p spot toy
  273. Pingback: prostate massagers
  274. Pingback: سکس انزال
  275. Pingback: viagra
  276. Pingback: viagra
  277. Pingback: viagra
  278. Pingback: viagra
  279. Pingback: viagra
  280. Pingback: viagra
  281. Pingback: viagra 2019
  282. Pingback: VIAGRA
  283. Pingback: skelaxin
  284. Pingback: sports betting
  285. Pingback: get free v bucks
  286. Pingback: VIAGRA
  287. Pingback: VIAGRA
  288. Pingback: FREE V BUCKS
  289. Pingback: VIAGRA
  290. Pingback: anal plug set
  291. Pingback: silicone anal plug
  292. Pingback: e !! HUSTLERS(201
  293. Pingback: v bucks
  294. Pingback: large double dong
  295. Pingback: visacard
  296. Pingback: panty vibe
  297. Pingback: vbucksfree. xyz
  298. Pingback: v-bucks generator
  299. Pingback: p spot vibrator
  300. Pingback: Porn
  301. Pingback: royal cbd
  302. Pingback: casual encounters
  303. Pingback: Topmediamarkt.com
  304. Pingback: porno
  305. Pingback: porn
  306. Pingback: bunny ear vibrator
  307. Pingback: nude
  308. Pingback: rampant rabbit
  309. Pingback: fake vagina
  310. Pingback: food near me
  311. Pingback: porn
  312. Pingback: streaming gratuit
  313. Pingback: sex toys review
  314. Pingback: best dildos
  315. Pingback: Google
  316. Pingback: 먹튀검증
  317. Pingback: 안전놀이터
  318. Pingback: 메이저토토
  319. Pingback: 먹튀업체
  320. Pingback: free robux Method
  321. Pingback: escort directory
  322. Pingback: bitcoin earnings
  323. Pingback: viagra pills
  324. Pingback: laws
  325. Pingback: viagra pills
  326. Pingback: Cleaning Melbourne
  327. Pingback: cbd capsules
  328. Pingback: cbd near me
  329. Pingback: male vacuum pump
  330. Pingback: fast boat to gili
  331. Pingback: sex
  332. Pingback: anime
  333. Pingback: CHEA VIAGRA ONLINE
  334. Pingback: biiig stiiizy
  335. Pingback: Infrared Cabin
  336. Pingback: Film Streaming
  337. Pingback: Threema Messenger
  338. Pingback: TIKB-060
  339. Pingback: SSNI 628
  340. Pingback: vibrating wand
  341. Pingback: anal sex
  342. Pingback: dv lottery
  343. Pingback: peliculas online
  344. Pingback: sex videos
  345. Pingback: pc games download
  346. Pingback: penis sleeve
  347. Pingback: SILAGRA (1X4)
  348. Pingback: the kpi institute
  349. Pingback: HND 749
  350. Pingback: dual vibrator
  351. Pingback: pocket pussy
  352. Pingback: clit toys
  353. Pingback: vibrating bullet
  354. Pingback: sex toys faqs
  355. Pingback: sex toys
  356. Pingback: quan an trua qua 1
  357. Pingback: Famous hunters
  358. Pingback: GENM 023
  359. Pingback: Flour mill Machine
  360. Pingback: rmit blackboard
  361. Pingback: food near me
  362. Pingback: food near me
  363. Pingback: free crm
  364. Pingback: Mesothelioma
  365. Pingback: Cryptocurrency
  366. Pingback: XXX VIDEOS
  367. Pingback: double bitcoin
  368. Pingback: robux promo codes
  369. Pingback: pc games download
  370. Pingback: anal
  371. Pingback: #beautysalon
  372. Pingback: big dildos
  373. Pingback: dildo sex toy
  374. Pingback: vibration asmr
  375. Pingback: anal asmr
  376. Pingback: airfare
  377. Pingback: blackhat seo links
  378. Pingback: Face Soap
  379. Pingback: 메이저놀이터
  380. Pingback: organic seeds
  381. Pingback: Donovan
  382. Pingback: realistic vibrator
  383. Pingback: bdsm
  384. Pingback: katmovies
  385. Pingback: Buy pbn links
  386. Pingback: sleeve surgery
  387. Pingback: silicone rabbit
  388. Pingback: silicone rabbit
  389. Pingback: 우리카지노
  390. Pingback: 더킹카지노
  391. Pingback: 퍼스트카지노
  392. Pingback: 예스카지노
  393. Pingback: flight ticket
  394. Pingback: mens stroker
  395. Pingback: top vibrators
  396. Pingback: PORN VIDEOS
  397. Pingback: web designing
  398. Pingback: viagra for men
  399. Pingback: Pizza near me
  400. Pingback: male sex toys
  401. Pingback: zwrot prowizji
  402. Pingback: CBD oil for pain
  403. Pingback: zwrot prowizji
  404. Pingback: sex
  405. Pingback: massager deluxe
  406. Pingback: ROBUX
  407. Pingback: coupon mall
  408. Pingback: phen375 review
  409. Pingback: flexible dildo
  410. Pingback: toys for men
  411. Pingback: powerful vibrator
  412. Pingback: pc app,
  413. Pingback: free app download,
  414. Pingback: robux generator
  415. Pingback: PORN DOWNLOAD
  416. Pingback: go here
  417. Pingback: large dong
  418. Pingback: anal toy
  419. Pingback: anal vibe
  420. Pingback: BEST PORN VIDEOS
  421. Pingback: SEX
  422. Pingback: XXX VIDEO
  423. Pingback: penis extension
  424. Pingback: games friv
  425. Pingback: legal
  426. Pingback: XXX VIDEOS
  427. Pingback: cbd for depression
  428. Pingback: website analitics
  429. Pingback: cbd for sleep
  430. Pingback: áo hoodie
  431. Pingback: analog pbx system
  432. Pingback: Anime Batch
  433. Pingback: Search Tempo
  434. Pingback: pelerin jeto
  435. Pingback: p spot toys
  436. Pingback: dildo vibrator
  437. Pingback: adam and eve store
  438. Pingback: male sex toys
  439. Pingback: LEGO 60213
  440. Pingback: cbd oil for sleep
  441. Pingback: adams dildo
  442. Pingback: PORN XX TEEN
  443. Pingback: biography wiki
  444. Pingback: anal toy kit
  445. Pingback: try me bitch ;)
  446. Pingback: best anal plugs
  447. Pingback: mens stroker
  448. Pingback: anal plug vibrator
  449. Pingback: g spot toy
  450. Pingback: Koinonia Messages
  451. Pingback: places to eat
  452. Pingback: shopping near me
  453. Pingback: VIAGRA
  454. Pingback: onewalmartwire
  455. Pingback: Naijaloaded
  456. Pingback: sex toys
  457. Pingback: rabbit vibrators
  458. Pingback: dog trainer
  459. Pingback: SSNI 672
  460. Pingback: ABP 937
  461. Pingback: terjemahan
  462. Pingback: VIAGRA
  463. Pingback: page
  464. Pingback: 코인카지노

Leave a Reply