Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Is this the right way to clear fields after user info has been submitted???

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 ;)

Comments

  • Sorry to bump this thread but a simple "yes" or "no" would be a great help :) Thanks
Sign In or Register to comment.