Re: [PHP] Tough one?

2001-02-21 Thread Jason Stechschulte
On Wed, Feb 21, 2001 at 01:34:10PM -0500, Mike wrote: > $keys = array_keys($HTTP_POST_VARS); > for($x = 2; $x < count($keys); $x++) > { > $updateString=$updateString.$keys[$x]."='".$HTTP_POST_VARS[$keys[$x]]."',"; } $updateString = ereg_replace(",$", "", $updateString); That should take care of

Re: [PHP] Tough one?

2001-02-21 Thread John Monfort
Actually, you may not have to do all that. you can use implode(). By default, implode will join an array, with the supplied character. So, if you have $list = (one two three four); you can do $all = implode("," , $list); to get $all = "one,two,three,four"; This w

Re: [PHP] Tough one?

2001-02-21 Thread Robin Vickery
> "M" == "Mike" <[EMAIL PROTECTED]> writes: > 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 upd

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[$

RE: [PHP] Tough one?

2001-02-22 Thread Tim Ward
> -Original Message- > From: Shawn Esplin [mailto:[EMAIL PROTECTED]] > Sent: 21 February 2001 20:17 > To: 'Mike'; [EMAIL PROTECTED] > Subject: RE: [PHP] Tough one? > > > I'm not sure this is the best way to do it, but you could try: > > $keys = a

Re: [PHP] Tough one?

2001-02-22 Thread Simon Garner
From: "Tim Ward" <[EMAIL PROTECTED]> > a quite neat (though maybe no more efficient) way would be ... > > $keys = array_keys($HTTP_POST_VARS); > $key_list = array(); > foreach($keys as $fred) > { $key_list() = $fred."='".$HTTP_POST_VARS[$fred]."'"; > } > $updateString=$updateString.implode(

RE: [PHP] Tough One

2001-03-29 Thread Krznaric Michael
To get this done I would use an Expect script, driven through CGI. Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 9:22 AM To: [EMAIL PROTECTED] Subject: [PHP] Tough One Hi, Ok I have a real tough one here (well to me it is :-

Re: [PHP] Tough One

2001-03-29 Thread Chris Moewes-Bystrom
I good solution for this kind of stuff is to just build a queue, either file or database. WHen you need to do a system type function you add that command to the queue, then have a cron job that runs (which can more safely run as a provolidged user), verifies that the function is ok and processe

Re: [PHP] Tough One

2001-03-29 Thread KPortsmout
In a message dated 29/03/2001 15:27:27 GMT Daylight Time, [EMAIL PROTECTED] writes: << To get this done I would use an Expect script, driven through CGI. Mike >> Problem is I don`t program in CGI so have no idea what you mean :-) Ade -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Tough One

2001-03-29 Thread Pierre-Yves Lemaire
This is the only viable solutions because most system admin will banned all system calls coming from the web. As it should be, I think. py At 08:34 AM 3/29/01 -0600, you wrote: >I good solution for this kind of stuff is to just build a queue, either file >or database. WHen you need to do a syste