For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > May 2007 > Re: [PHP-WIN] Re: [PHP-DB] $_POST["mypassword"]; ***Undefined index:









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-WIN] Re: [PHP-DB] $_POST["mypassword"]; ***Undefined index:
Mikael Grön

2007-05-15, 3:58 am

Simple. A resource, like the stuff you get when running mysql_query for
instance ($resource = mysql_query($sql);) cannot be stored in a session
variable. When you go to a new page, the resource variable is no longer
linked to the results of the mysql query and thus wasn't stored.
You following?

But I don't understand what sessions and resources has to do with $_POST
variables!

Mike

bedul skrev:
> 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.
>
> for phpWin.. this topic perhaps easy for you to answer.
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com