To All, I am so thankful to Dimiter, Bedul, Chris and Mikael for their input in this issue of mine. I spent at least three full crazy, frustrating long days and nights working this so-called problem only to find out it is simply the PHP parser looking at a "moment in time" with the login.php function. After running the script, the incredible PHP "mind" saw two 'empty' and 'unlabeled' containers amongst all the other 'properly' dressed containers and whatnot, that happened to be associated with the $_POST array. This to my mind is a bit of a bug. For you all see that it is 'normal' that certain functions and resources are only 'holding' values for as long as they 'have' to. Their nature is to be empty, and ready to take another value for as long as the contract is called for, and not a microsecond longer. So the PHP trigger_error()(generated in PHP code like an E_WARNING) is simply not able to hold itself back from commenting on issues such as this. Anyway, I learned things I would have never learned this soon and rewrote these function about twenty times looking for a better way. God, I love coding! Blessings, Chetanji -(a he) Bedul wrote: it seem the poster already have the answer.. what he/she going to do was how to save username and pass on session. thx for your help > [ taking php-windows out again :P ] > > bedul wrote: > the problem is right here (said on error msg): > session_register("myusername"); session_register("mypassword"); > > u should use session_register("myusername") after declare the name. > i taken from my php chm > > It is currently impossible to register resource variables in a session. For example, you cannot create a connection to a database and store the connection id as a session variable and expect the connection to still be valid the next time the session is restored. PHP functions that return a resource are identified by having a return type of resource in their function definition. A list of functions that return resources are available in the resource types appendix. > > if you understand what statement above.. conguration, if not.. don't shock.. me either. > > You can't store database connections in a session. > > Ie you can't: > > $connection = mysql_connect(....); > > $_SESSION['DbConnection'] = $connection; > > > because the HTTP protocol (and thus PHP) is stateless - you don't know > where the next connection is coming from or even if there is another > connection coming. > > If there is another HTTP request, you have no way of linking request '1' > (where the database connection was set up) to request '47' in the chain. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php