THIS IS IN THE START OF INDEX.PHP:
<?php
if(!isset($_GET['code'])){
header('location: index.php?code=900');
}
THIS IS WHERE THE BUTTON IS:
<a href="http://<?php echo $_GET['code'] ?>.dev.test.com/">click here</a>
What I'm trying to do is, when it requests 'code' to have multiple options to choose from and randomly select (ex. code=900, code=200). I tried with array but I always get error.
Any suggestions? Help is much appreciated. Thanks.
Latest comments (3)
Can you update your question with more detail please. If not done in 24 hours, the #help tag will be removed.
As @tmblog said, what error do you have?
And, is that
type of URL setup on your webserver?
If you use Apache, maybe you need a rewrite rule to turn that address into:
where $1 is the capturing group of the rewrite rule.
Please provide more details.
What's the error you get?