I am currently using the following code for Get variables, and would like to know the best way to convert to an array. Is the main advantage of doing this just aesthetic, or is there a performance/efficiency aspect as well?
if (isset($_GET["cmd"]))
$cmd = $_GET["cmd"];
else
die("Invalid URL");
if (isset($_GET["username"]))
{ $username = $_GET["username"];}
if (isset($_GET["firstname"]))
{ $firstname = $_GET["firstname"];}
if (isset($_GET["lastname"]))
{ $lastname = $_GET["lastname"];}
if (isset($_GET["street1"]))
{ $street1 = $_GET["street1"];}
if (isset($_GET["city1"]))
{ $city1 = $_GET["city1"];}
if (isset($_GET["postcode1"]))
{ $postcode1 = $_GET["postcode1"];}
if (isset($_GET["street2"]))
{ $street2 = $_GET["street2"];}
if (isset($_GET["city2"]))
{ $city2 = $_GET["city2"];}
if (isset($_GET["postcode2"]))
{ $postcode2 = $_GET["postcode2"];}
if (isset($_GET["phone"]))
{ $phone = $_GET["phone"];}
if (isset($_GET["mobilephone"]))
{ $mobilephone = $_GET["mobilephone"];}
if (isset($_GET["fax"]))
{ $fax = $_GET["fax"];}
if (isset($_GET["email"]))
{ $email = $_GET["email"];}
if (isset($_GET["website"]))
{ $website = $_GET["website"];}
if (isset($_GET["bank"]))
{ $bank = $_GET["bank"];}
if (isset($_GET["banknumber"]))
{ $banknumber = $_GET["banknumber"];}
if (isset($_GET["accountnumber"]))
{ $accountnumber = $_GET["accountnumber"];}
if (isset($_GET["subcat"]))
{ $subcat = $_GET["subcat"];}