I can get the email to show for Stripe, when a user clicks the premium link at the bottom of my page, a Stripe purchase window comes up. The window will ask for the users email, credit/debit card info.
I have setup the Stripe purchase window to where the user doesn't have to enter their email, it automatically has their accounts email typed out for them.
I completed that task by echoing the users email in the code above, you can see where I did that on the <form> code I posted last.
I now want the user to be updated when they purchase premium. I want to update them in the database by their email, considering their email will be unique.
So I need help with doing this.
The code I've posted above is updating users in the database by their ID, the only problem I have with that is, the only way it'll update the user by their ID is if I type the users ID at the top in SESSION. It goes the same with the email.
I don't care if it updates them to premium by finding their email or ID in the database, but I want to set it where it updates that user after they purchase and only that user, without me having to type in their user id or email in the session.
Basically, I want to be able to put, $user->email, or something like that and define all users, then update users in the database depending on their email, after they purchase . The only way I can update the user by email or ID is by typing it in the session myself.