Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. <?php
  2. include("dbconnection.php");
  3.  
  4. if(isset($_GET["codigo"])){
  5.  
  6. $sql = "SELECT Codigo FROM Curso WHERE Codigo='".$_GET["codigo"]."'";
  7. $result = $conn->query($sql);
  8.  
  9. if ($result->num_rows > 0) {
  10. echo "0";
  11. } else {
  12. echo "1";
  13. }
  14.  
  15. }else{
  16. echo "0";
  17. }
  18.  
  19. $conn->close();
  20.  
  21. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement