Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [insert_php]
- include(ABSPATH.'hms_/my_utilities')
- // include(ABSPATH.'hms_/my_utilities'); // <--- This prints the content of the file, so path is correct
- // This function, copied from my_utilities, works as expected
- function getUserID_($username, $password) {
- $connection = mysqli_connect("","root","root","hms_db");
- $query="select uid from users where username='$username' and password='$password'";
- $result=mysqli_query($connection, $query);
- if(mysqli_num_rows($result) == 0){
- mysqli_close($connection);
- return -1;
- }
- while($row = mysqli_fetch_array($result)) {
- $uid = $row['uid'];
- }
- mysqli_close($connection);
- return $uid;
- }
- [/insert_php]
- [insert_php]
- echo ABSPATH.'hms_/my_utilities';
- echo $date;
- if(isset($_POST['submit1']))
- {
- $username=$_POST['username'];
- $password=$_POST['password'];
- $uid = getUserID($username, $password); <-- function in my_utilities
- // $uid = getUserID_($username, $password); <-- same function above
- .
- .
- <rest of the code>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement