I want to redirect a user to a folder named by his/her phone number(the folder created when the user signed up) and here is a part of my code:
if (count($errors) == 0) {
$password = md5($password);
$query = "SELECT * FROM users WHERE username='$username' AND password='$password'";
$results = mysqli_query($db, $query);
if (mysqli_num_rows($results) == 1) {
$row=mysql_fetch_assoc($results);
$folder = $row['phone'];
$_SESSION['username'] = $username;
$_SESSION['success'] = "You are now logged in";
header("location:$folder"."/index.php");
It redirects the users to /index.php