I apologize if I'm redoing this question, I searched a lot and did not find anything like it.
My problem is that I have to send many variables using $_GET
using two pages
The following code is from pagina-cadastro.php
if($_GET['v1'] != '' || ($_GET['v2'] != '') || ($_GET['v3'] != '') || ($_GET['v4'] != '') || ($_GET['v5'] != '') || ($_GET['v6'] != '') || ($_GET['v7'] != '') ||
($_GET['v8'] != '') || ($_GET['v9'] != '') || ($_GET['v10'] != '')
$razaoSocial = $_GET['v1'];
$nomeFantasia = $_GET['v2'];
$cnpj = $_GET['v3'];
$email = $_GET['v4'];
$inscrEstadual = $_GET['v5'];
$inscrMunicipal = $_GET['v6'];
$cep = $_GET['v7'];
$rua = $_GET['v8'];
$numero = $_GET['v9'];
$complemento = $_GET['v10'];
} else {
$razaoSocial = "";
$nomeFantasia = "";
$cnpj = "";
$email = "";
$inscrEstadual = "";
$inscrMunicipal = "";
$cep = "";
$rua = "";
$numero = "";
$complemento = "";
and the cadastrar.php
page is
"<script> window.location = 'pagina-cadastro.php?&v1=".$razaoSocial."&v2=".$nomeFantasia . "&v3=".$cnpj . "&v4=". $email ."&v5=". $inscrEstadual . "&v6=".$inscrMunicipal . "&v7=" .$cep . "&v8=" .$rua . "&v9=" .$numero . "&v10=" .$complemento
I've posted only 10 variables, but I have to do 150. How can I optimize my time not to write one by one?