Pass data to a new window

takalaktakalak BeginnerLink Clerk
Hi, I want to pass data to a new window from a hyperlink. How do I pass data to this window without showing the data on the web address or is this the only way? especailly for login info, which should be invisible to the user or encrypted! The data passed to the new window will be used to login the user.

eg:
is there a way to pass data to a new window with this method using hyperlink:

$user="username";
$pass="password";
<a href='www.mysite.com/login.php?' target='_blank'>Login to new site</a>

or I can only use this method, but will show the parameter data

<a href='www.mysite.com/login.php?username='.$user."&pass=".$pass.:' target='_blank'>Login to new site</a>


Thanks

Comments

  • PythonPython Forum Leader The Royal RAM
    I dont think that it can be done without showing the info unless you use cookies or something. I might be wrong though.

    I know for a fact that it can be done with forms - thats done easily enough

    The Royal Ram

  • angrylizardangrylizard Junior Member Shared Hoster
    You would want to use session variables to make that work. They maintain variables that the user cannot change through browser input, like for example if you set a session variable called $stuff, the user couldn't change it by going to pagename.php?stuff=things

    Also, the user wont see session variables and it is by far the most secure way to manage them
  • dabossdaboss WP V.I.P. ''The Boss'' Administrator
  • PythonPython Forum Leader The Royal RAM
    one problem with using cookies is that not all browsers are set to use them. some disallow and block cookies

    The Royal Ram

Sign In or Register to comment.