I can't get Framework7 to use the URL variable
?username=User1 on the next page.
It is generated and assigned to the link on page 1 but doesn't get used in either the SQL query or the echo statements on page 2.
Page 1 sets the variable in a hyperlink with;
profile.php?username=<?php echo htmlentities($row['username'], ENT_QUOTES, 'UTF-8'); ?>
Page 2 'gets' the variable using;
<?php $username = (isset($_GET['username']))? trim(strip_tags($_GET['username'])) : ""; ?>
Framework7 is a web application framework - www.idangero.us/framework7/.
Edited to add full source of profile.php which is to use variable.
// First we execute our common code to connection to the database and start the session
// At the top of the page we check to see whether the user is logged in or not
// If they are not, we redirect them to the login page.
// Remember that this die statement is absolutely critical. Without it,
// people can view your members-only content without logging in.
die("Redirecting to index.php");
// Everything below this point in the file is secured by the login system
// We can retrieve a list of members from the database using a SELECT query.
// In this case we do not have a WHERE clause because we want to select all
// of the rows from the database table.
$query = "
FROM users WHERE username = '$username'
// These two statements run the query against your database table.
$stmt = $db->prepare($query);
// Note: On a production website