Can anyone tell me why  this piece of code is not working - I'm finding that
if I pass values rather then the HTTP_COOKIE_VARS["cookiename"] to the
function it seems to work but I want to have this value a variable cookie
(for obvious reasons). I cannot seem to find any more information on this
function other then it is better to use this method rather then just using
the $cookiename variable as it stops the variable being passed through the
URL - though using these variables works fine.

//a function to load Registered Users pref's overiteing Guest pref's
function PrefResults($user, $password)
{
global $DB_Server, $HTTP_Host, $DB_Login, $DB_Password, $DB_Name, $DocRoot,
$language_pref, $currency_pref, $notifyme_pref, $page_pref;

$db = mysql_connect("$DB_Server", "$DB_Login","$DB_Password");
mysql_select_db("$DB_Name",$db);
$result = mysql_query("SELECT language_pref, currency_pref, page_pref,
notifyme_pref FROM users WHERE user_id=$user AND password=$password",$db);
$pref_settings = mysql_fetch_array($result);
   $language_pref = $pref_settings["language_pref"];
   $currency_pref = $pref_settings["currency_pref"];
   $notifyme_pref = $pref_settings["notifyme_pref"];
   $page_pref = $pref_settings["page_pref"];
}




PrefResults($HTTP_COOKIE_VARS["cookie_user"],$HTTP_COOKIE_VARS["cookie_passw
ord"]);



Regards
Jamie



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to