commit | 66ad5cf4fedd8ee54ab6594e7b09a8720846e1d8 | [log] [tgz] |
---|---|---|
author | Andreu <andreuhuguet@gmail.com> | Wed Sep 18 17:15:44 2019 +0200 |
committer | Andreu <andreuhuguet@gmail.com> | Wed Sep 18 17:15:44 2019 +0200 |
tree | 7df03ed5fdd825ad69f9fa8423d9b8d252e311df | |
parent | 2c6367c39c35eb1f2e9c399da1e21112c9b5d6d7 [diff] [blame] |
Sending requests with PHP
diff --git a/db/fetch.php b/db/fetch.php new file mode 100644 index 0000000..eddd5dd --- /dev/null +++ b/db/fetch.php
@@ -0,0 +1,17 @@ +<?php + if ($result = $conn->query($query)) { + + // Fetch the information of the user + while ($row = $result->fetch_row()) { + $user->id = $row[0]; + $user->nomcomplet = $row[1]; + $user->curs = $row[2]; + $user->grau = $row[3]; + $user->quimata = $row[4]; + } + + $result->close(); + } else { + echo "Wrong query"; + } +?>