Hi,
The following code complains:
Parse error: parse error, unexpected T_VARIABLE
if (!isset($_SERVER["QUERY_STRING"]) || empty($_SERVER["QUERY_STRING"]))
{
print "<h1>Try again</h1>";
}
else
{
$var = $_SERVER["QUERY_STRING"];
switch (strtolower($var))
{
case "something":
$id = "2729988";
break;
case "something-else":
$id = "2337545";
break;
case "something-new":
$id = "2729801";
break;
default:
$id = "2327497";
}
print "<div style=\"display:block;\">";
print "<form action=\"http://www.whatever.com/form.php\" method=\"POST\" name=\"InputForm\">";
print "<input type=\"hidden\" name=\"verificationUserID\" value=\"" $id "\">"; //on this line
print "</form>";
print "</div>";
}
I don't understand it? I only want the form to be printed if the query-string is set and not empty, and yet it is printed whether query-string is set, empty or whatever.
😕 😕 😕