Advertisement
dyanedrdeams

Prob in php

Nov 15th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. php file ko sir. gagamitin ko sana sa for google drive pagconnect ng android app ko tolaptop
  2.  
  3. <?php
  4.  
  5. //This script is designed by Android-Examples.com
  6. //Define your host here.
  7. $hostname = "localhost";
  8. //Define your database username here.
  9. $username = "Real";
  10. //Define your database password here.
  11. $password = "1234567890";
  12. //Define your database name here.
  13. $dbname = "library";
  14.  
  15. $con = mysqli_connect($hostname,$username,$password,$dbname);
  16.  
  17. $StudentNo = $_POST['studentno'];
  18. $StudentName = $_POST['studentname'];
  19. $ContactNo = $_POST['contactno'];
  20. $Title = $_POST['title'];
  21. $Author = $_POST['author'];
  22. $Subject = $_POST['subject'];
  23. $CallNo = $_POST['callno'];
  24.  
  25. $Sql_Query = "insert into studreserve (studentno,studentname,contactno,title,author,subject,callno) values
  26. ('$StudentNo','$StudentName','$ContactNo','$Title','$Author','$Subject','$CallNo')";
  27.  
  28. if(mysqli_query($con,$Sql_Query)){
  29.  
  30. echo 'Loi';
  31.  
  32. }
  33. else{
  34.  
  35. echo 'Try Again';
  36.  
  37. }
  38. mysqli_close($con);
  39. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement