Can this be done?
$author = strtolower($_SESSION['valid_username']);
I want to enter all authors in the table as lower case.
Yes, this option is as long as it is $_SESSION['valid_username'] set, otherwise you will receive a notification (if your error reporting is set so low).
$_SESSION['valid_username']
You can check if it exists with if (isset($_SESSION['valid_username']))
if (isset($_SESSION['valid_username']))
Yes.
is a session variable that evaluates a string, so passing it as a parameter to the strtolower function is not a problem.