I am using this code to send just one variable:
Variable:
Username
header("Location: ultrapro.php?username=".$_POST['username']);
If I want to send more then one variable like:
- Username
- Password
- Phone
---Code----------?
It's a bad idea to send your username and password through a GET request. Don't do it.
If you really must, then use http_build_query():
$query = array(
'username' => $_POST['username'],
'password' => $_POST['password'],
'phone' => $_POST['phone']
);
$query = http_build_query($query);
header("Location: ultrapro.php?$query");
not working, you should try to find out why it's not working. Adding ini_set('display_errors',1); error_reporting(E_ALL); to the very top of your script might help with debugging :)header("Location: " . $username . "?password=" . $pass . "&phone=" . $phone);
Use & to concatenate the parameters:
header("Location: ultrapro.php?var1=".$_GET['var1']."&var2=".$_GET['var2']."&var3=".$_GET['var3']);
." at the end)
?username=".$_POST['username']."&password=".$_POST['password']...