Search found 5 matches

by Ek0nomik
Sun Mar 01, 2009 7:04 pm
Forum: PHP - Code
Topic: PHP Session Not Saving?
Replies: 6
Views: 333

Re: PHP Session Not Saving?

Here is a simplified example of my session variable testing: test.php: <?php session_start(); $_SESSION['x'] = foo; echo $_SESSION['x']; ?> test2.php: <?php echo $_SESSION['x']; ?> test.php sets the session variable x, equal to foo. It then echoes the session variable properly on the screen. test2.p...
by Ek0nomik
Sun Mar 01, 2009 5:58 pm
Forum: PHP - Code
Topic: PHP Session Not Saving?
Replies: 6
Views: 333

Re: PHP Session Not Saving?

You don't need to supply the session id. I never do. Might be bad coding practices but it works. As for the problem. Maybe the session works and its the assigning of the value that doesn't. Does your function return a value when you assign the session variable? Have you checked it by simply echoing...
by Ek0nomik
Sun Mar 01, 2009 1:20 pm
Forum: PHP - Code
Topic: PHP Session Not Saving?
Replies: 6
Views: 333

PHP Session Not Saving?

Here is my processLogin.php page which processes the login information: <?php require_once("clsUser.php"); require_once("clsUserDB.php");   $strUsername = $_POST['txtUsername']; $strPassword = $_POST['txtPassword'];   #creating the database object. $objUserDB = new clsUserDB;   #...
by Ek0nomik
Tue Feb 24, 2009 7:52 am
Forum: PHP - Code
Topic: How To Create List of Class?
Replies: 2
Views: 124

Re: How To Create List of Class?

Thanks. :)
by Ek0nomik
Sun Feb 22, 2009 12:30 am
Forum: PHP - Code
Topic: How To Create List of Class?
Replies: 2
Views: 124

How To Create List of Class?

I am wondering how I can create a list of one of my classes. As an example, I have a class called Product, and it has properties of ProductID, and ProductName. These values get pulled and populated from the database via accessors. How can I create an object, say, $objProducts that contains a list of...