Hi!
I'm loading a renamed copy of open.php in a iframe - I use it as a contact form. I have a problem that if a user visit the page with the contact form while they are logged in, then it shows the users name, email address (and the upload field) instead of the empty fields a first time visitor would see. I can imagine that some people would freak out because they think that the whole world can see their name and email address on my website.... :)
I need to clear these fields (I tried to load the logout.php file, but it didn't work the way I thought it would), so I tried to insert this in my renamed copy of open.php at the very top:
<?php
require('client.inc.php');
if($thisclient && $thisclient->getId() && $thisclient->isValid()){
session_unset();
session_destroy();
require('client.inc.php');
}
else
and then it continues with the rest of the code (define('SOURCE','Web')..... etc.)
It works, but is it full of errors? For some reason I have to require the client.inc.php file two times, otherwise it won't work - not sure why...
Many thanks for any help ;)