Reputation: 2257
We can send data to another file using header location:
header(location: payment.php?email=$email);
And receive:
$email = $_GET['email'];
But as I want to send some important credential, I dont want to use GET
. Is there any way to do it using POST?
I can not use session, so please ignore it
Upvotes: 2
Views: 5621
Reputation: 9635
try this auto submit form
<?php
if(isset($email))
{
?>
<form name="myForm" id="myForm" action="payment.php" method="POST">
<input name="email" value="<?php echo $email;?>" />
</form>
<script>
function submitform()
{
document.getElementById("myForm").submit();
}
window.onload = submitform;
</script>
<?php
}
?>
Upvotes: 4