Jump to content

Recommended Posts

umm i use both cookies and sessions for my login system depending on if the user has cookies enabled or not.
it works fine but 1 person cant login...he uses internet explorer cookies enabled(accepts al cookies)..
but he still cant get in not with cookies or sessions.
I was wondering if theres any other way to pass information safley like username and password.
Link to comment
https://forums.phpfreaks.com/topic/31828-cookies-vs-sessions/
Share on other sites

You can try:

[code=php:0]
$username = $_POST['username'];
$password = $_POST['password']; //or md5($_POST['password']) whichever you're using
if(isset($username) && isset($password)){

$cookie1 = setcookie("name","value","time");
$cookie2 = setcookie("name","value","time");
//etc...

if($cookie1 && $cookie2){
//log in using cookies
}else {
$_SESSION['sess1'] = sess1;
$_SESSION['sess2'] = sess2;
}
}
[/code]
Link to comment
https://forums.phpfreaks.com/topic/31828-cookies-vs-sessions/#findComment-147722
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.