I need a page to redirect to another page with out a set url. I tried using the way of combining strings...
Code:
...but in the end it will only come out as:
instead of:
Please help.
Code:
<?php
srand((double)microtime()*10000);
$number = rand(0,100);
$random[1] = "****";
$random[2] = "****";
$random[3] = "****";
$random[4] = "****";
$random[5] = "****";
$random[6] = "****";
$random[7] = "****";
$random[8] = "****";
$random[9] = "****";
$random[10] = "****";
$random[11] = "****";
$random[12] = "****";
$random[13] = "****";
$random[14] = "****";
$random[15] = "****";
$n = rand(1,15);
$word = $random['$n'];
$item = $HTTP_GET_VARS['item'];
$url = "file.php?id=" . $random['$n'] . $number . "&item=" . $item . "";
header("location:" . $url);
?>
...but in the end it will only come out as:
- file.php?id=###&item=blah
instead of:
- file.php?id=****###&item=blah
Please help.
- I did not release the whole code so, all my random variables = ****, but in the real code there all differant.