1
When the user accesses the property details page on my website, I need to store the broker’s email in a Session, and when he sends the proposal form, the broker’s email is sent to the file responsible for the firing of e-mail in Hidden input, I retrieve his email in the.php email file and is sent the proposal directly to him through phpmailer.
Ex: Accessing property 3174, I will store the email of the broker x responsible for this property, if access another property destroys the previous session and creates a new one with the email of the broker of the current property.
//Aqui eu crio a session['corretor']
if(!isset($_SESSION['corretor'])){
echo $_SESSION['corretor']=$results['email'];
}
How do I so that every time a different property is accessed, the current session is destroyed and a new one is created storing the email of the broker responsible for the property?
every time you set up the session, it will already reset the previous session. But you can destroy a session just like this:
unset($_SESSION['corretor'])
.– Ivan Ferrer
@Ivanferrer, thank you very much for the collaboration, it has already been solved. Qlqer thing I am available.
– Igor Silva