i've just made a sign script for my website. The form posts the data to itself and then checks to see if all the data is correct. if so it then loads a payment page. To load this payment page i use:
header(location: payment.php);
So i want to send data over to the page that im loading, i though i could use:
$userid = mysql_insert_id();
to get the last id added to the database but its not working, maybe im using it wrong though. Anyway, i know what in my database the email address on every record with be unique as well as the id, so i thought maybe i'd change the header to:
header(location: payment.php?email=$email);
This way it would put the email address into the URL and i'd be able to find the user again on the next page by using:
$email = $_GET['email'];
Now this works fine and from that i can get the users details from the database. However i thought that putting someones email address into the URL wasn't best practice but i can't for the life of me think of another way around it.
Any suggestions or good ways of doing this?
Thanks for the time.