ok to test i can do sessions (because i was getting no where in my main test) i made this.

	if($user['password'] == $_POST['password'])

{	
session_name('PRO-admin');

session_start('PRO-admin');

$_SESSION['username'] = 'testname';

$_SESSION['password'] = 'test';

That doesn't work, but

	if($user['password'] == $_POST['password'])

{	

session_start('PRO-admin');

$_SESSION['username'] = $_POST['username'];

$_SESSION['password'] = $_POST['password'];

does. (thought it is set as PHPSESSID which i don't like.)

The page it is going to, is a modified copy straight off of php.net:

<?php
// page2.php

session_start('PRO-admin');

echo 'Welcome to page #2<br />';

echo $_SESSION['username'];
echo $_SESSION['password']; 

// You may want to use SID here, like we did in page1.php
echo '<br /><a href="page1.php">page 1</a>';
?> 

Now they seem to use different encoding, and that's also another potential source for the problem. but with the session_name above session_start() it's just blank, without, it displays the correct data.

If anyone can help, that'd be greatly appreciated, as this is driving me literally up the wall. =/

    Try

    <?php
    session_name('PRO-admin');
    session_start();
    echo 'Welcome to page #2<br />';
    
    echo $_SESSION['username'];
    echo $_SESSION['password']; 
    
    // You may want to use SID here, like we did in page1.php
    echo '<br /><a href="page1.php">page 1</a>';
    ?> 

      Well, a couple quick things to do:

      1. session_start() does not accept any arguments.

      2. If you are going to assign a name via session_name(), it must consist of only alphanumeric characters, at least one of which must be a letter.

      Frankly, there is seldom a need to set the session name, so unless you have a specific reason to do so, I would just let PHP do its own automatic assignment.

        Thanks muchly you two, i finally got around to testing it, and it worked like a dream. used clark's version, and put the name inside the adminlogin.php like this

        	if($user['password'] == $_POST['password'])
        
        {	
        session_name('PRO-admin');
        
        session_start();
        $_SESSION['username'] = 'testname';
        
        $_SESSION['password'] = 'test';
        
        
        require_once('..
        
          Write a Reply...