I am trying to figure out the correct code to select a certain user's email from my database on a page other than the page where the email was provided. For example: The user will enter their information on the registration page then once their payment is confirmed through paypal I am sending them a confirmation email in my thank you page using the mail function. What I cant figure out is how to select the correct email without having a variable to use in the WHERE portion of my query line. I have tried using SESSIONS but I keep getting an undefined variable error. If anyone can help I would be very grateful.
if the email is entered in the database, can't you just take it from the database again?
Yes you could but if there are multiple emails in the database there has to be a criteria for selecting the correct one. This is not for the page where the email was originally posted. Its ok though I have decided to go about it another way.