With PHP, I have a script that searches for an email from a mysql_db then takes a username from the same row as the email in the db. What I want it to do is redirect using the username as a subdomain in the url
I've tried:
$username = //username taken from the db
$url = 'http://".$username."domain.com';
header('location: $url');
This just appends the variable "$url" to the end of my test url.
and I've tried:
header('http://".$username."domain.com');
This outputs in the adress bar:
http://%22.%24account_name.%22.domain.com
How can use this search result variable and redirect to the subdomain I am looking for?