Jump to content


Photo

SESSIONS Problem!


  • Please log in to reply
27 replies to this topic

#21 shoaibi

shoaibi
  • Members
  • PipPip
  • Member
  • 21 posts

Posted 02 August 2006 - 06:45 AM

what about using POST['varable_names'];

sorry redarrow but if i had to come back to the POST and why did i used sessions, the only thing i wanted was that more secure, more reliable. and also easy, POST won't be easy as i don't thing except then the form you cna use POST to transfer information from one place to other.

#22 mastermike707

mastermike707
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 02 August 2006 - 06:51 AM

//login.php

ob_start();
SESSOIN_START();

I think the misspelling of SESSION_START() might have something to do with it.
[url=http://www.mastermike707.com/new/][/url]

#23 shoaibi

shoaibi
  • Members
  • PipPip
  • Member
  • 21 posts

Posted 02 August 2006 - 06:53 AM

//login.php

ob_start();
SESSOIN_START();

I think the misspelling of SESSION_START() might have something to do with it.

That's the problem you found here, but in the actuall code its not.... ;)

#24 mastermike707

mastermike707
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 02 August 2006 - 06:54 AM

dang, ok figured u copied and pasted so thats why I said it.
[url=http://www.mastermike707.com/new/][/url]

#25 mastermike707

mastermike707
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 02 August 2006 - 06:56 AM

Maybe try clearing ur cookies?
Look at the settings in php info for sessions.
[url=http://www.mastermike707.com/new/][/url]

#26 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 02 August 2006 - 06:57 AM

You need to use post with or with out sessions to get the session to do somthink ha.

test.php
<?session_start();

$name=."my name is redarrow";
$age=."MY age is 31";

$name$_POST['name']
$age=$_POST['age'];

$_SESSION['name']=$name;
$_SESSION['age']=$age;

echo"<a href='test_rsult.php'>test me</a>";

?>

test_result
<?session_start();

echo "<br>$name:$age<br>";

?>
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#27 shoaibi

shoaibi
  • Members
  • PipPip
  • Member
  • 21 posts

Posted 02 August 2006 - 06:58 AM


nope that's not the case, i am not dumb enough to leakout my actual code like this even if just a inch of it ;), just wanna be more secure

#28 mastermike707

mastermike707
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 02 August 2006 - 07:01 AM

Ok idk what to do, here is the session code I ussually use:
class session
{
	function start($auth = true)
	{
		session_start();
		
		if(!isset($_SESSION['user_id']) && $auth)
		{
			header('Location: login.php');
			exit;
		}
		$_SESSION['ip'] = $_SERVER['REMOTE_ADDR'];
		define('LOGGED_IN', (isset($_SESSION['logged_in'])) ?  $_SESSION['logged_in'] : false);
	}
	function destroy()
	{
		$_SESSION = array();
		session_destroy();
	}
}

Try that and see if it works.
[url=http://www.mastermike707.com/new/][/url]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users