[PHP] Trans sid and form posts

2001-02-21 Thread Shawn Esplin

Can anyone tell me if trans sid is supposed to work through form posts, and
if so how to make it work right?  It is working fine through normal links,
but we have quite a few posts, and they lose the session. :(

Thanks,
Shawn

-- 
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]




RE: [PHP] Tough one?

2001-02-21 Thread Shawn Esplin

I'm not sure this is the best way to do it, but you could try:

$keys = array_keys($HTTP_POST_VARS);
for($x = 2; $x < (count($keys) - 1); $x++)
{
 
$updateString=$updateString.$keys[$x]."='".$HTTP_POST_VARS[$keys[$x]]."',";
}
$x++;
$updateString=$updateString.$keys[$x]."='".$HTTP_POST_VARS[$keys[$x]]."'";

or:

$keys = array_keys($HTTP_POST_VARS);
for($x = 2; $x < count($keys); $x++)
{
  if($x != (count($keys) - 1))
  {
 
$updateString=$updateString.$keys[$x]."='".$HTTP_POST_VARS[$keys[$x]]."',";
  }
  else
  {
 
$updateString=$updateString.$keys[$x]."='".$HTTP_POST_VARS[$keys[$x]]."'";
  }
}

-Original Message-
From: Mike [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 21, 2001 11:34 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Tough one?


I am building an update string on the fly from form fields.I am trying to
add a comma between fields but I cant have one after the last field.This is
the code that doesnt work.Also I cant have a comma at all in a table with
only one updated field.

$keys = array_keys($HTTP_POST_VARS);
for($x = 2; $x < count($keys); $x++)
{
$updateString=$updateString.$keys[$x]."='".$HTTP_POST_VARS[$keys[$x]]."',";

Thanks
Mike
[EMAIL PROTECTED]




-- 
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]

-- 
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]